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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2190
call fcn.0046a3d0
mov eax, dword [0x495040]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0xfc
mov dword [ebp - 0x120], eax
xor ebx, ebx
lea eax, [ebp - 0x108]
mov esi, ecx
push ebx
push eax
mov dword [ebp - 0x11c], esi
mov dword [ebp - 0x10c], 0x73706172
call fcn.00460930
push 0x30
lea eax, [ebp - 0x184]
push ebx
push eax
mov dword [ebp - 0x188], ebx
call fcn.00460930
add esp, 0x18
lea eax, [ebp - 0x188]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
je 0x40752e
mov eax, dword [ebp - 0x188]
and eax, 0x200
je 0x40752e
xor eax, eax
mov dword [ebp - 0x134], ebx
lea edi, [ebp - 0x130]
stosd dword es:[edi], eax
lea eax, [ebp - 0x130]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov eax, dword [ebp - 0x130]
mov dword [ebp - 0x100], eax
xor eax, eax
lea edi, [ebp - 0x140]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x1ffc
stosd dword es:[edi], eax
lea eax, [ebp - 0x2188]
push ebx
push eax
mov dword [ebp - 0x134], esi
mov dword [ebp - 0x104], esi
mov dword [ebp - 0x218c], ebx
call fcn.00460930
mov eax, dword [ebp - 0x130]
add esp, 0xc
push ebx
mov dword [ebp - 0x138], eax
lea eax, [ebp - 0x128]
push eax
mov dword [ebp - 0x13c], esi
mov esi, 0x2000
push esi
lea eax, [ebp - 0x218c]
push eax
push 0x10
lea eax, [ebp - 0x144]
push eax
push 0x940cf
push dword [ebp - 0x11c]
mov dword [ebp - 0x128], ebx
mov dword [ebp - 0x144], ebx
mov dword [ebp - 0x140], ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40752e
mov eax, dword [ebp - 0x128]
cmp eax, ebx
je 0x40752e
cmp eax, esi
jne 0x40741b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x40752e
mov eax, dword [ebp - 0x128]
shr eax, 4
push ebx
mov dword [ebp - 0x110], eax
mov dword [ebp - 0x108], eax
lea eax, [ebp - 0x114]
push eax
mov esi, 0x100
push esi
lea eax, [ebp - 0x10c]
push eax
push dword [ebp - 0x120]
mov dword [ebp - 0x114], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40752e
cmp dword [ebp - 0x114], esi
jne 0x40752e
mov dword [ebp - 0x118], ebx
cmp dword [ebp - 0x110], ebx
jbe 0x40751d
lea eax, [ebp - 0x218c]
mov dword [ebp - 0x124], eax
mov esi, dword [ebp - 0x124]
lea edi, [ebp - 0x154]
movsd dword es:[edi], dword [esi]
push ebx
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x114]
push eax
push 0x10
lea eax, [ebp - 0x154]
movsd dword es:[edi], dword [esi]
push eax
push dword [ebp - 0x120]
movsd dword es:[edi], dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40751d
cmp dword [ebp - 0x114], 0x10
jne 0x40751d
push ebx
push ebx
push dword [ebp - 0x150]
push dword [ebp - 0x154]
push dword [ebp - 0x11c]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push dword [ebp - 0x120]
lea esi, [ebp - 0x154]
push dword [ebp - 0x11c]
sub esp, 0x10
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.00407201
add esp, 0x18
test eax, eax
je 0x40751d
inc dword [ebp - 0x118]
mov eax, dword [ebp - 0x118]
add dword [ebp - 0x124], 0x10
cmp eax, dword [ebp - 0x110]
jb 0x407483
mov eax, dword [ebp - 0x110]
cmp dword [ebp - 0x118], eax
jne 0x40752e
xor ebx, ebx
inc ebx
mov ecx, dword [ebp - 8]
pop edi
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.0045e86d
leave
ret