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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x828
mov eax, dword [0x439450]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push ebx
push esi
push eax
lea eax, [ebp - 0x604]
push 0x105
push eax
mov dword [ebp - 0x668], ecx
call fcn.0041687f
add esp, 0xc
xor esi, esi
push esi
push 0x80
push 3
push esi
push esi
push 0xc0000000
lea eax, [ebp - 0x604]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
mov dword [ebp - 0x60c], ebx
cmp ebx, 0xffffffff
je 0x41268b
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
push 0x431498
call fcn.004087f7
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
push eax
lea eax, [ebp - 0x4fc]
push eax
call edi
add esp, 0xc
push esi
lea ecx, [ebp - 0x610]
push ecx
push eax
lea eax, [ebp - 0x4fc]
push eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
call ebx
push 0x431408
call fcn.004087f7
push eax
lea eax, [ebp - 0x4fc]
push eax
call edi
add esp, 0xc
push esi
lea ecx, [ebp - 0x610]
push ecx
push eax
lea eax, [ebp - 0x4fc]
push eax
push dword [ebp - 0x60c]
call ebx
push 0x4313b8
call fcn.004087f7
push eax
lea eax, [ebp - 0x4fc]
push eax
call edi
add esp, 0xc
push esi
lea ecx, [ebp - 0x610]
push ecx
push eax
lea eax, [ebp - 0x4fc]
push eax
push dword [ebp - 0x60c]
call ebx
lea eax, [ebp - 0x828]
push eax
push 0x64
call dword [sym.imp.KERNEL32.dll_GetProcessHeaps]
mov dword [ebp - 0x670], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [ebp - 0x678], eax
mov dword [ebp - 0x62c], esi
cmp dword [ebp - 0x670], esi
jbe 0x412b8e
mov eax, dword [ebp - 0x62c]
mov eax, dword [ebp + eax*4 - 0x828]
push eax
mov dword [ebp - 0x65c], esi
mov dword [ebp - 0x658], esi
mov dword [ebp - 0x634], esi
mov dword [ebp - 0x630], esi
mov dword [ebp - 0x664], esi
mov dword [ebp - 0x660], esi
mov dword [ebp - 0x624], esi
mov dword [ebp - 0x620], esi
mov dword [ebp - 0x654], esi
mov dword [ebp - 0x650], esi
mov dword [ebp - 0x644], esi
mov dword [ebp - 0x640], esi
mov dword [ebp - 0x63c], esi
mov dword [ebp - 0x638], esi
mov dword [ebp - 0x64c], esi
mov dword [ebp - 0x648], esi
mov dword [ebp - 0x61c], esi
mov dword [ebp - 0x618], esi
mov dword [ebp - 0x614], eax
call dword [sym.imp.KERNEL32.dll_HeapLock]
test eax, eax
je 0x412b76
push 0x1c
lea eax, [ebp - 0x698]
push esi
push eax
call fcn.00416670
add esp, 0xc
lea eax, [ebp - 0x698]
push eax
push dword [ebp - 0x614]
call dword [sym.imp.KERNEL32.dll_HeapWalk]
cmp eax, esi
je 0x412701
movzx eax, byte [ebp - 0x690]
cdq
add dword [ebp - 0x654], eax
mov eax, dword [ebp - 0x694]
adc dword [ebp - 0x650], edx
test byte [ebp - 0x68e], 1
je 0x412695
add dword [ebp - 0x644], eax
adc dword [ebp - 0x640], esi
add dword [ebp - 0x63c], 1
adc dword [ebp - 0x638], esi
jmp 0x412632
call fcn.00411350
jmp 0x412b9b
test byte [ebp - 0x68e], 2
je 0x4126bc
add dword [ebp - 0x664], eax
adc dword [ebp - 0x660], esi
add dword [ebp - 0x624], 1
adc dword [ebp - 0x620], esi
jmp 0x412632
test byte [ebp - 0x68e], 4
je 0x4126e3
add dword [ebp - 0x65c], eax
adc dword [ebp - 0x658], esi
add dword [ebp - 0x634], 1
adc dword [ebp - 0x630], esi
jmp 0x412632
add dword [ebp - 0x64c], eax
adc dword [ebp - 0x648], esi
add dword [ebp - 0x61c], 1
adc dword [ebp - 0x618], esi
jmp 0x412632
push dword [ebp - 0x614]
call dword [sym.imp.KERNEL32.dll_HeapUnlock]
xor eax, eax
mov byte [ebp - 0x605], 0
mov dword [ebp - 0x628], esi
cmp dword [ebp + 0x10], esi
jbe 0x412755
mov ecx, dword [ebp - 0x668]
add ecx, 4
mov edx, dword [ecx]
cmp edx, dword [ebp - 0x614]
je 0x41273f
inc eax
add ecx, 0xc
cmp eax, dword [ebp + 0x10]
jb 0x41272a
jmp 0x412755
imul eax, eax, 0xc
add eax, dword [ebp - 0x668]
mov byte [ebp - 0x605], 1
mov dword [ebp - 0x628], eax
push 0x80
lea eax, [ebp - 0xfc]
push eax
push dword [ebp - 0x614]
mov byte [ebp - 0xfc], 0
call fcn.00412272
or dword [ebp - 0x674], 0xffffffff
add esp, 0xc
lea eax, [ebp - 0x67c]
push eax
push 4
lea eax, [ebp - 0x674]
push eax
push esi
push dword [ebp - 0x614]
mov dword [ebp - 0x67c], esi
call dword [sym.imp.KERNEL32.dll_HeapQueryInformation]
mov eax, dword [ebp - 0x674]
cmp eax, 0xffffffff
jne 0x4127b2
mov edx, str.Heap_Query_Failed
jmp 0x4127d8
cmp eax, esi
jne 0x4127bd
mov edx, str.RegularHeap
jmp 0x4127d8
cmp eax, 1
jne 0x4127c9
mov edx, str.Look_asides
jmp 0x4127d8
mov edx, str.Low_Frag
cmp eax, 2
je 0x4127d8
mov edx, str.Unknown_Heap_Type
mov eax, dword [ebp - 0x628]
cmp eax, esi
je 0x4127f2
mov eax, dword [eax + 8]
mov dword [ebp - 0x628], eax
mov eax, 0x42be24
jmp 0x4127fd
mov eax, 0x42be24
mov dword [ebp - 0x628], eax
cmp byte [ebp - 0x605], 0
mov dword [ebp - 0x66c], str.CRT_HEAP:
jne 0x412816
mov dword [ebp - 0x66c], eax
mov ecx, dword [ebp - 0x614]
cmp dword [ebp - 0x678], ecx
jne 0x412829
mov eax, str.PROCESS_HEAP
push edx
push dword [ebp - 0x628]
push dword [ebp - 0x66c]
push eax
lea eax, [ebp - 0xfc]
push eax
push ecx
push ecx
push dword [ebp - 0x62c]
push 0x431314
call fcn.004087f7
pop ecx
push eax
lea eax, [ebp - 0x4fc]
push eax
call edi
add esp, 0x28
push esi
lea ecx, [ebp - 0x610]
push ecx
push eax
lea eax, [ebp - 0x4fc]
push eax
push dword [ebp - 0x60c]
call ebx
cmp dword [ebp - 0x630], esi
ja 0x412886
cmp dword [ebp - 0x634], esi
jbe 0x4128a5
push dword [ebp - 0x630]
push dword [ebp - 0x634]
push dword [ebp - 0x658]
push dword [ebp - 0x65c]
call fcn.0041b140
jmp 0x4128a9
xor eax, eax
xor edx, edx
push edx
push eax
lea esi, [ebp - 0x2c]
call fcn.004114a0
pop ecx
pop ecx
push eax
push dword [ebp - 0x630]
lea esi, [ebp - 0x54]
push dword [ebp - 0x634]
call fcn.004114a0
pop ecx
pop ecx
push eax
push dword [ebp - 0x658]
lea esi, [ebp - 0x7c]
push dword [ebp - 0x65c]
call fcn.004114a0
pop ecx
pop ecx
push eax
push 0x4312e0
call fcn.004087f7
pop ecx
push eax
lea eax, [ebp - 0x4fc]
push eax
call edi
add esp, 0x14
xor esi, esi
push esi
lea ecx, [ebp - 0x610]
push ecx
push eax
lea eax, [ebp - 0x4fc]
push eax
push dword [ebp - 0x60c]
call ebx
cmp dword [ebp - 0x620], esi
ja 0x412926
cmp dword [ebp - 0x624], esi
jbe 0x412945
push dword [ebp - 0x620]
push dword [ebp - 0x624]
push dword [ebp - 0x660]
push dword [ebp - 0x664]
call fcn.0041b140
jmp 0x412949
xor eax, eax
xor edx, edx
push edx
push eax
lea esi, [ebp - 0x2c]
call fcn.004114a0
pop ecx
pop ecx
push eax
push dword [ebp - 0x620]
lea esi, [ebp - 0x54]
push dword [ebp - 0x624]
call fcn.004114a0
pop ecx
pop ecx
push eax
push dword [ebp - 0x660]
lea esi, [ebp - 0x7c]
push dword [ebp - 0x664]
call fcn.004114a0
pop ecx
pop ecx
push eax
push 0x4312a8
call fcn.004087f7
pop ecx
push eax
lea eax, [ebp - 0x4fc]
push eax
call edi
add esp, 0x14
xor esi, esi
push esi
lea ecx, [ebp - 0x610]
push ecx
push eax
lea eax, [ebp - 0x4fc]
push eax
push dword [ebp - 0x60c]
call ebx
cmp dword [ebp - 0x618], esi
ja 0x4129c6
cmp dword [ebp - 0x61c], esi
jbe 0x4129e5
push dword [ebp - 0x618]
push dword [ebp - 0x61c]
push dword [ebp - 0x648]
push dword [ebp - 0x64c]
call fcn.0041b140
jmp 0x4129e9
xor eax, eax
xor edx, edx
push edx
push eax
lea esi, [ebp - 0x2c]
call fcn.004114a0
pop ecx
pop ecx
push eax
push dword [ebp - 0x618]
lea esi, [ebp - 0x54]
push dword [ebp - 0x61c]
call fcn.004114a0
pop ecx
pop ecx
push eax
push dword [ebp - 0x648]
lea esi, [ebp - 0x7c]
push dword [ebp - 0x64c]
call fcn.004114a0
pop ecx
pop ecx
push eax
push 0x431278
call fcn.004087f7
pop ecx
push eax
lea eax, [ebp - 0x4fc]
push eax
call edi
add esp, 0x14
xor esi, esi
push esi
lea ecx, [ebp - 0x610]
push ecx
push eax
lea eax, [ebp - 0x4fc]
push eax
push dword [ebp - 0x60c]
call ebx
cmp dword [ebp - 0x638], esi
ja 0x412a66
cmp dword [ebp - 0x63c], esi
jbe 0x412a85
push dword [ebp - 0x638]
push dword [ebp - 0x63c]
push dword [ebp - 0x640]
push dword [ebp - 0x644]
call fcn.0041b140
jmp 0x412a89
xor eax, eax
xor edx, edx
push edx
push eax
lea esi, [ebp - 0x2c]
call fcn.004114a0
pop ecx
pop ecx
push eax
push dword [ebp - 0x638]
lea esi, [ebp - 0x54]
push dword [ebp - 0x63c]
call fcn.004114a0
pop ecx
pop ecx
push eax
push dword [ebp - 0x640]
lea esi, [ebp - 0x7c]
push dword [ebp - 0x644]
call fcn.004114a0
pop ecx
pop ecx
push eax
push 0x431244
call fcn.004087f7
pop ecx
push eax
lea eax, [ebp - 0x4fc]
push eax
call edi
add esp, 0x14
xor esi, esi
push esi
lea ecx, [ebp - 0x610]
push ecx
push eax
lea eax, [ebp - 0x4fc]
push eax
push dword [ebp - 0x60c]
call ebx
push dword [ebp - 0x650]
push dword [ebp - 0x654]
call fcn.00411611
pop ecx
pop ecx
push eax
push 0x431224
call fcn.004087f7
pop ecx
push eax
lea eax, [ebp - 0x4fc]
push eax
call edi
add esp, 0xc
push esi
lea ecx, [ebp - 0x610]
push ecx
push eax
lea eax, [ebp - 0x4fc]
push eax
push dword [ebp - 0x60c]
call ebx
push dword [ebp - 0x650]
push dword [ebp - 0x654]
push 0x431498
call fcn.004087f7
pop ecx
push eax
lea eax, [ebp - 0x4fc]
push eax
call edi
add esp, 0x10
push esi
lea ecx, [ebp - 0x610]
push ecx
push eax
lea eax, [ebp - 0x4fc]
push eax
push dword [ebp - 0x60c]
call ebx
inc dword [ebp - 0x62c]
mov eax, dword [ebp - 0x62c]
cmp eax, dword [ebp - 0x670]
jb 0x412592
push dword [ebp - 0x60c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00416261
leave
ret