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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100c12c0
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x1010b070]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x3c]
push 0xe
push str.dr_padcket.dat
mov dword [ebp - 0x28], 0xf
mov dword [ebp - 0x2c], 0
mov byte [ebp - 0x3c], 0
call fcn.100057f3
lea eax, [ebp - 0x3c]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.100424d0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x28]
cmp eax, 0x10
jb 0x10041fa1
mov ecx, dword [ebp - 0x3c]
inc eax
cmp eax, 0x1000
jb 0x10041f98
test cl, 0x1f
je 0x10041f74
call fcn.10090951
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x10041f80
call fcn.10090951
sub ecx, eax
cmp ecx, 4
jae 0x10041f8c
call fcn.10090951
cmp ecx, 0x23
jbe 0x10041f96
call fcn.10090951
mov ecx, eax
push ecx
call fcn.1008a9f2
add esp, 4
cmp dword [ebp - 0x40], 0x10
lea eax, [ebp - 0x54]
push 0
cmovae eax, dword [ebp - 0x54]
push 0x80
push 4
push 0
push 0
push 0xc0000000
push eax
mov dword [ebp - 0x28], 0xf
mov dword [ebp - 0x2c], 0
mov byte [ebp - 0x3c], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x10041ff8
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x64], eax
cmp eax, 0x100000
jbe 0x10042005
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.10041e60
xor esi, esi
jmp 0x10042181
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
call fcn.1003ff00
push ecx
lea ecx, [ebp - 0x7c]
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], edx
call fcn.10043f60
lea eax, [ebp - 0x58]
mov ecx, ebx
push eax
call fcn.10039e90
lea eax, [ebp - 0x70]
mov ecx, ebx
push eax
call fcn.10043f10
push eax
lea ecx, [ebp - 0x58]
call fcn.10036c00
test al, al
je 0x10042167
nop dword [eax]
lea ecx, [ebp - 0x58]
call fcn.100435d0
mov edi, dword [eax]
mov ecx, edi
call fcn.10040af0
test eax, eax
je 0x10042143
call fcn.10040ad0
add eax, 0x15180
adc edx, 0
cmp dword [ebp - 0x68], edx
jg 0x10042143
jl 0x1004208a
cmp dword [ebp - 0x6c], eax
jae 0x10042143
mov ecx, edi
call fcn.10040030
mov dword [ebp - 0x5c], eax
call fcn.10040ad0
mov ecx, dword [ebp - 0x78]
sub ecx, dword [ebp - 0x7c]
mov dword [ebp - 0x24], eax
dec ecx
mov eax, dword [ebp - 0x5c]
mov word [ebp - 0x18], cx
lea ecx, [ebp - 0x7c]
mov dword [ebp - 0x20], edx
mov dx, word [eax + 0x14]
mov word [ebp - 0x1c], dx
mov ax, word [eax + 0x1c]
mov word [ebp - 0x1a], ax
lea eax, [ebp - 0x18]
push eax
push 0
call fcn.10043f40
push eax
mov ecx, edi
call fcn.1003ff80
mov ecx, eax
call fcn.10040a10
test al, al
je 0x10042143
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x60]
push 0
push eax
push 0x10
lea eax, [ebp - 0x24]
push eax
push esi
call edi
mov ecx, dword [ebp - 0x5c]
add ecx, 4
cmp dword [ecx + 0x14], 0x10
jb 0x10042101
mov ecx, dword [ecx]
push 0
lea eax, [ebp - 0x60]
push eax
movzx eax, word [ebp - 0x1c]
push eax
push ecx
push esi
call edi
push 0
lea eax, [ebp - 0x60]
push eax
movzx eax, word [ebp - 0x18]
lea ecx, [ebp - 0x7c]
push eax
push 0
call fcn.10043f40
push eax
push esi
call edi
movzx ecx, word [ebp - 0x1c]
movzx eax, word [ebp - 0x18]
add ecx, 0x10
add eax, dword [ebp - 0x64]
add eax, ecx
mov dword [ebp - 0x64], eax
cmp eax, 0x100000
ja 0x10042167
lea ecx, [ebp - 0x58]
call fcn.100435e0
lea eax, [ebp - 0x70]
mov ecx, ebx
push eax
call fcn.10043f10
push eax
lea ecx, [ebp - 0x58]
call fcn.10036c00
test al, al
jne 0x10042050
push ebx
call fcn.10041e60
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x7c]
mov esi, 1
call fcn.10043f50
mov eax, dword [ebp - 0x40]
cmp eax, 0x10
jb 0x100421cb
mov ecx, dword [ebp - 0x54]
inc eax
cmp eax, 0x1000
jb 0x100421c2
test cl, 0x1f
je 0x1004219e
call fcn.10090951
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x100421aa
call fcn.10090951
sub ecx, eax
cmp ecx, 4
jae 0x100421b6
call fcn.10090951
cmp ecx, 0x23
jbe 0x100421c0
call fcn.10090951
mov ecx, eax
push ecx
call fcn.1008a9f2
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1008a9f7
mov esp, ebp
pop ebp
ret 4