Function at 0x10043260
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100c2660
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x1010e070]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x64], esi
mov ecx, dword [esi + 0x20]
call fcn.10049c50
test eax, eax
je 0x1004351c
push 0xe
push str.dr_padcket.dat
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x24], 0xf
mov dword [ebp - 0x28], 0
mov byte [ebp - 0x38], 0
call fcn.10005859
lea eax, [ebp - 0x38]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.10043540
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x24]
cmp eax, 0x10
jb 0x10043323
mov ecx, dword [ebp - 0x38]
inc eax
cmp eax, 0x1000
jb 0x1004331a
test cl, 0x1f
je 0x100432f6
call fcn.10091aa1
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x10043302
call fcn.10091aa1
sub ecx, eax
cmp ecx, 4
jae 0x1004330e
call fcn.10091aa1
cmp ecx, 0x23
jbe 0x10043318
call fcn.10091aa1
mov ecx, eax
push ecx
call fcn.1008bb42
add esp, 4
cmp dword [ebp - 0x3c], 0x10
lea eax, [ebp - 0x50]
push 0
cmovae eax, dword [ebp - 0x50]
push 0x80
push 4
push 0
push 0
push 0xc0000000
push eax
mov dword [ebp - 0x24], 0xf
mov dword [ebp - 0x28], 0
mov byte [ebp - 0x38], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x100434d2
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0x100000
jbe 0x10043383
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100434d2
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ecx
lea ecx, [ebp - 0x70]
call fcn.10044fd0
call fcn.10040f80
mov ecx, dword [esi + 0x20]
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], edx
call fcn.10049be0
mov esi, eax
test esi, esi
je 0x100434c3
mov ecx, esi
call fcn.10041b70
test eax, eax
je 0x1004349a
call fcn.10041b50
add eax, 0x15180
adc edx, 0
cmp dword [ebp - 0x5c], edx
jg 0x1004349a
jl 0x100433e6
cmp dword [ebp - 0x60], eax
jae 0x1004349a
mov ecx, esi
call fcn.100410b0
mov dword [ebp - 0x54], eax
call fcn.10041b50
mov ecx, dword [ebp - 0x6c]
sub ecx, dword [ebp - 0x70]
mov dword [ebp - 0x20], eax
dec ecx
mov eax, dword [ebp - 0x54]
mov word [ebp - 0x14], cx
mov dword [ebp - 0x1c], edx
mov cx, word [eax + 0x14]
mov word [ebp - 0x18], cx
lea ecx, [ebp - 0x70]
mov ax, word [eax + 0x1c]
mov word [ebp - 0x16], ax
lea eax, [ebp - 0x14]
push eax
push 0
call fcn.10044fb0
push eax
mov ecx, esi
call fcn.10041000
mov ecx, eax
call fcn.10041a90
test al, al
je 0x1004349a
push 0
lea eax, [ebp - 0x58]
push eax
push 0x10
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x54]
add ecx, 4
cmp dword [ecx + 0x14], 0x10
jb 0x1004345b
mov ecx, dword [ecx]
push 0
lea eax, [ebp - 0x58]
push eax
movzx eax, word [ebp - 0x18]
push eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x58]
push eax
movzx eax, word [ebp - 0x14]
lea ecx, [ebp - 0x70]
push eax
push 0
call fcn.10044fb0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
movzx ecx, word [ebp - 0x18]
movzx eax, word [ebp - 0x14]
add eax, ebx
lea ebx, [ecx + 0x10]
add ebx, eax
test esi, esi
je 0x100434a6
push ecx
mov ecx, esi
call fcn.1003ab00
cmp ebx, 0x100000
ja 0x100434c3
mov eax, dword [ebp - 0x64]
mov ecx, dword [eax + 0x20]
call fcn.10049be0
mov esi, eax
test esi, esi
jne 0x100433b6
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x70]
call fcn.10044fc0
mov eax, dword [ebp - 0x3c]
cmp eax, 0x10
jb 0x1004351c
mov ecx, dword [ebp - 0x50]
inc eax
cmp eax, 0x1000
jb 0x10043513
test cl, 0x1f
je 0x100434ef
call fcn.10091aa1
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x100434fb
call fcn.10091aa1
sub ecx, eax
cmp ecx, 4
jae 0x10043507
call fcn.10091aa1
cmp ecx, 0x23
jbe 0x10043511
call fcn.10091aa1
mov ecx, eax
push ecx
call fcn.1008bb42
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1008bb47
mov esp, ebp
pop ebp
ret