Function at 0x4393a0
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 0x4393ef
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 0x4397ce
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 0x4397ce
test edi, edi
jle 0x4397a3
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 0x43953e
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 0x4394a0
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 0x439470
jmp 0x43953a
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 0x4394df
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 0x4394b0
jmp 0x439536
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 0x43952e
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 0x4397ce
mov eax, dword [ecx + 0x2a]
add ecx, 0x2a
sub eax, dword [esp + 0x34]
push eax
push ecx
call fcn.00430a20
inc esi
add esp, 8
add ebx, 0x18
cmp esi, edi
jl 0x4394f0
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 0x43958d
mov eax, 0xffffffeb
mov dword [esp + 0x20], eax
jmp 0x439696
cmp dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
jbe 0x439685
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 0x439678
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 0x439671
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 0x43966a
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 0x439671
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 0x439663
test ebx, ebx
js 0x43967d
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 0x4395b0
jmp 0x439681
mov ebx, 0xffffffe3
jmp 0x43967d
mov ebx, 0xffffffe4
jmp 0x43967d
mov ebx, 0xffffffe5
jmp 0x43967d
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 0x43978d
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 0x439455
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 0x4396fd
cmp dword [ebp + esi*4], 0
jne 0x4396fd
inc esi
cmp esi, edi
jl 0x4396f1
mov eax, esi
cmp esi, edi
jge 0x43970f
cmp dword [ebp + esi*4], 0
je 0x43970f
inc esi
cmp esi, edi
jl 0x439703
push edi
push esi
push eax
push ebx
call fcn.00438fc0
add esp, 0x10
cmp esi, edi
jl 0x4396f1
xor eax, eax
mov ebx, eax
mov dword [esp + 0x48], ebx
cmp eax, edi
jge 0x43973c
nop dword [eax + eax]
cmp dword [ebp + eax*4], 0
jne 0x43973c
inc eax
cmp eax, edi
jl 0x439730
mov ecx, eax
mov dword [esp + 0x50], ecx
cmp eax, edi
je 0x4397ac
jge 0x439754
cmp dword [ebp + eax*4], 0
je 0x439754
inc eax
cmp eax, edi
jl 0x439748
mov esi, eax
cmp eax, edi
jge 0x439787
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 0x439765
mov ebp, dword [esp + 0x58]
mov ebx, eax
sub ebx, dword [esp + 0x50]
add ebx, dword [esp + 0x48]
jmp 0x439723
sub eax, ecx
add ebx, eax
jmp 0x4397ac
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