Function at 0x439040
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x4c
push ebp
push esi
push edi
mov edi, dword [esp + 0x64]
xorps xmm0, xmm0
push 4
xor esi, esi
movlpd qword [esp + 0x50], xmm0
push edi
movlpd qword [esp + 0x4c], xmm0
mov dword [esp + 0x38], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x30], esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov ebp, eax
add esp, 8
mov dword [esp + 0x54], ebp
test ebp, ebp
jne 0x43908f
pop edi
lea eax, [esi - 0x15]
pop esi
pop ebp
add esp, 0x4c
ret
push ebx
mov ebx, dword [esp + 0x60]
mov eax, dword [ebx + 0x48]
mov dword [esp + 0x28], eax
mov dword [ebx + 0x14], 2
mov eax, dword [eax + 0x3c]
test eax, eax
je 0x43946e
push 0
push 0
push 0
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
add esp, 0x10
test eax, eax
jne 0x43946e
test edi, edi
jle 0x439443
mov ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x50]
mov edx, dword [esp + 0x4c]
mov ebx, dword [esp + 0x48]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x14], ebx
cmp esi, edi
jge 0x4391de
mov ebp, dword [esp + 0x58]
lea eax, [esi + 1]
lea eax, [esi + eax*2]
lea eax, [eax*8]
add eax, dword [esp + 0x64]
nop word [eax + eax]
cmp dword [eax - 0xc], 0
jne 0x439140
mov edx, dword [esp + 0x10]
add edx, dword [eax]
mov ebx, edx
mov dword [esp + 0x10], edx
adc ecx, 0
mov dword [esp + 0x14], ebx
inc esi
mov dword [esp + 0x18], ecx
mov edx, ecx
add eax, 0x18
mov dword [esp + 0x1c], edx
cmp esi, edi
jl 0x439110
jmp 0x4391da
mov ecx, dword [esp + 0x64]
lea eax, [esi + esi*2]
lea ecx, [ecx + eax*8]
add ecx, 0x10
nop dword [eax]
cmp dword [ecx - 0xc], 1
jne 0x43917f
mov dword [ebp + esi*4], 1
mov eax, dword [ecx]
add ebx, eax
mov dword [esp + 0x14], ebx
adc edx, 0
add dword [esp + 0x34], eax
inc dword [esp + 0x2c]
inc esi
add ecx, 0x18
mov dword [esp + 0x1c], edx
cmp esi, edi
jl 0x439150
jmp 0x4391d6
mov ecx, dword [esp + 0x64]
lea ebx, [esi + 1]
lea ebx, [esi + ebx*2]
lea ebx, [ecx + ebx*8]
nop dword [eax]
cmp dword [ebx - 0xc], 2
jne 0x4391ce
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
add eax, dword [ebx]
mov dword [esp + 0x24], eax
mov eax, dword [edx + 0x10]
mov ecx, dword [eax + esi*4]
add ecx, dword [edx]
je 0x43946e
mov eax, dword [ecx + 0x2a]
add ecx, 0x2a
sub eax, dword [esp + 0x34]
push eax
push ecx
call fcn.004306d0
inc esi
add esp, 8
add ebx, 0x18
cmp esi, edi
jl 0x439190
mov ebx, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
mov ebp, dword [esp + 0x24]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x28]
push 0x1000
push 1
mov dword [esp + 0x50], ebp
mov eax, dword [eax + 0x3c]
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], edx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x38], eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov ebp, dword [esp + 0x60]
mov ecx, eax
add esp, 8
mov dword [esp + 0x50], ecx
test ecx, ecx
jne 0x43922d
mov eax, 0xffffffeb
mov dword [esp + 0x20], eax
jmp 0x439336
cmp dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
jbe 0x439325
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x40]
nop dword [eax + eax]
cmp eax, 0x1000
mov ebx, eax
mov eax, 0x1000
cmovae ebx, eax
cmp ebx, eax
ja 0x439318
push 0
push dword [esp + 0x48]
push ecx
push dword [esp + 0x3c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
add esp, 0x10
test eax, eax
jne 0x439311
push dword [esp + 0x30]
push ebx
push 1
push dword [esp + 0x5c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp eax, ebx
jne 0x43930a
push 0
push dword [esp + 0x40]
push dword [esp + 0x40]
push dword [esp + 0x3c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
add esp, 0x10
test eax, eax
jne 0x439311
push dword [esp + 0x30]
push ebx
push 1
push dword [esp + 0x5c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp eax, ebx
jne 0x439303
test ebx, ebx
js 0x43931d
mov ecx, dword [esp + 0x40]
mov eax, ebx
cdq
add dword [esp + 0x38], eax
adc dword [esp + 0x3c], edx
add ecx, eax
mov eax, dword [esp + 0x48]
adc dword [esp + 0x44], edx
sub eax, ebx
add dword [esp + 0x20], ebx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x48], eax
test eax, eax
jne 0x439250
jmp 0x439321
mov ebx, 0xffffffe3
jmp 0x43931d
mov ebx, 0xffffffe4
jmp 0x43931d
mov ebx, 0xffffffe5
jmp 0x43931d
mov ebx, 0xffffffe6
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x14]
push dword [esp + 0x50]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [esp + 0x24]
add esp, 4
mov edx, dword [esp + 0x24]
cmp eax, edx
jne 0x43942d
add dword [esp + 0x10], edx
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
adc ecx, 0
add ebx, edx
mov dword [esp + 0x18], ecx
mov edx, dword [esp + 0x1c]
adc edx, 0
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], edx
cmp esi, edi
jl 0x4390f5
mov ecx, dword [esp + 0x60]
mov eax, dword [esp + 0x34]
sub dword [ecx], eax
mov eax, edi
sbb dword [ecx + 4], 0
xor esi, esi
sub eax, dword [esp + 0x2c]
xor ebx, ebx
mov ebx, dword [esp + 0x28]
mov dword [ecx + 0x10], eax
cmp esi, edi
jge 0x43939d
cmp dword [ebp + esi*4], 0
jne 0x43939d
inc esi
cmp esi, edi
jl 0x439391
mov eax, esi
cmp esi, edi
jge 0x4393af
cmp dword [ebp + esi*4], 0
je 0x4393af
inc esi
cmp esi, edi
jl 0x4393a3
push edi
push esi
push eax
push ebx
call fcn.00438c60
add esp, 0x10
cmp esi, edi
jl 0x439391
xor eax, eax
mov ebx, eax
mov dword [esp + 0x48], ebx
cmp eax, edi
jge 0x4393dc
nop dword [eax + eax]
cmp dword [ebp + eax*4], 0
jne 0x4393dc
inc eax
cmp eax, edi
jl 0x4393d0
mov ecx, eax
mov dword [esp + 0x50], ecx
cmp eax, edi
je 0x43944c
jge 0x4393f4
cmp dword [ebp + eax*4], 0
je 0x4393f4
inc eax
cmp eax, edi
jl 0x4393e8
mov esi, eax
cmp eax, edi
jge 0x439427
mov ebp, dword [esp + 0x28]
lea ebx, [ecx*4]
mov edx, dword [ebp + 0x10]
lea ebx, [ebx + 4]
mov ecx, dword [edx + esi*4]
inc esi
mov dword [edx + ebx - 4], ecx
cmp esi, edi
jl 0x439405
mov ebp, dword [esp + 0x58]
mov ebx, eax
sub ebx, dword [esp + 0x50]
add ebx, dword [esp + 0x48]
jmp 0x4393c3
sub eax, ecx
add ebx, eax
jmp 0x43944c
push ebp
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [esp + 0x24]
add esp, 4
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x4c
ret
mov dword [ebx + 0x10], edi
xor ebx, ebx
mov dword [esp + 0x2c], ebx
mov eax, dword [esp + 0x28]
sub edi, ebx
shl edi, 2
push ebp
mov dword [eax + 0x14], edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [esp + 0x30]
add esp, 4
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x4c
ret
push ebp
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, 0xfffffffd
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x4c
ret