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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x504
mov eax, dword [0x426004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
push esi
push edi
mov dword [ebp - 0x450], ebx
mov eax, dword [ebx + 0x18]
cmp eax, 0xffffffff
je 0x40423a
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [ebp - 0x40c]
push 0
push ecx
push 1
lea ecx, [ebp - 0x411]
push ecx
push eax
call edi
test eax, eax
je 0x40423a
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
nop dword [eax]
nop word [eax + eax]
movzx eax, byte [ebp - 0x411]
cmp eax, 0xc
ja case.default.0x403ff0
jmp dword [eax*4 + 0x404950]
push 0
lea eax, [ebp - 0x40c]
push eax
push 4
lea eax, [ebx + 0x21c]
push eax
push dword [ebx + 0x18]
call edi
test eax, eax
je 0x40423a
mov ecx, ebx
call fcn.00401a00
push 0
mov dword [ebp - 0x438], eax
lea eax, [ebp - 0x484]
push eax
push 4
lea eax, [ebp - 0x438]
push eax
push dword [ebx + 0x18]
call esi
cmp dword [ebp - 0x438], 0
je case.default.0x403ff0
xor eax, eax
cmp dword [ebx + 0x230], eax
push 0
setne al
mov dword [ebp - 0x438], eax
lea eax, [ebp - 0x484]
push eax
push 4
lea eax, [ebp - 0x438]
push eax
push dword [ebx + 0x18]
call esi
jmp case.default.0x403ff0
push 0
lea eax, [ebp - 0x40c]
push eax
push 8
lea eax, [ebp - 0x4f8]
push eax
push dword [ebx + 0x18]
call edi
test eax, eax
je 0x40423a
mov eax, dword [ebp - 0x4f8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
jmp case.default.0x403ff0
mov ecx, dword [ebx + 0x22c]
test ecx, ecx
je case.default.0x403ff0
mov dword [ebp - 0x42c], 0
lea edx, [ebp - 0x440]
mov eax, dword [ecx]
push edx
push ecx
call dword [eax + 0x68]
test eax, eax
jne 0x404250
mov dword [ebp - 0x410], eax
lea edx, [ebp - 0x420]
mov eax, dword [ebp - 0x440]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov eax, dword [ebp - 0x420]
shl eax, 2
push eax
call fcn.0040ff98
mov ecx, dword [ebp - 0x440]
add esp, 4
mov edi, eax
lea eax, [ebp - 0x420]
mov edx, dword [ecx]
push eax
push edi
push dword [ebp - 0x420]
push ecx
call dword [edx + 0x1c]
mov eax, dword [ebp - 0x420]
push 0
mov dword [ebp - 0x42c], eax
lea eax, [ebp - 0x43c]
push eax
push 4
lea eax, [ebp - 0x42c]
push eax
push dword [ebx + 0x18]
call esi
xor esi, esi
cmp dword [ebp - 0x420], esi
jbe 0x4041f6
nop dword [eax]
mov eax, dword [edi + esi*4]
cdq
push 0
mov dword [ebp - 0x498], eax
lea eax, [ebp - 0x43c]
push eax
push 8
lea eax, [ebp - 0x498]
mov dword [ebp - 0x494], edx
push eax
push dword [ebx + 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x410], 0
lea edx, [ebp - 0x208]
mov eax, dword [edi + esi*4]
push edx
lea edx, [ebp - 0x410]
push edx
mov ecx, dword [eax]
push 0xff
push eax
call dword [ecx + 0x4c]
mov eax, dword [ebp - 0x410]
add eax, eax
push 0
mov dword [ebp - 0x410], eax
lea eax, [ebp - 0x43c]
push eax
push 4
lea eax, [ebp - 0x410]
push eax
push dword [ebx + 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x43c]
push eax
push dword [ebp - 0x410]
lea eax, [ebp - 0x208]
push eax
push dword [ebx + 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
inc esi
cmp esi, dword [ebp - 0x420]
jb 0x404150
test edi, edi
je 0x404203
push edi
call fcn.0040fd70
add esp, 4
mov eax, dword [ebp - 0x440]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [ebp - 0x40c]
push eax
push 1
lea eax, [ebp - 0x411]
push eax
push dword [ebx + 0x18]
call edi
test eax, eax
jne 0x403fe0
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004050db
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 0x43c]
push eax
push 4
lea eax, [ebp - 0x42c]
push eax
push dword [ebx + 0x18]
call esi
jmp case.default.0x403ff0
push 0
lea eax, [ebp - 0x40c]
push eax
push 8
lea eax, [ebp - 0x4a0]
push eax
push dword [ebx + 0x18]
call edi
test eax, eax
je 0x40423a
push dword [ebp - 0x49c]
mov ecx, ebx
push dword [ebp - 0x4a0]
call fcn.00402140
jmp case.default.0x403ff0
push 0
lea eax, [ebp - 0x40c]
push eax
push 8
lea eax, [ebp - 0x4a8]
push eax
push dword [ebx + 0x18]
call edi
test eax, eax
je 0x40423a
push dword [ebp - 0x4a4]
mov ecx, ebx
push dword [ebp - 0x4a8]
call fcn.00402590
jmp case.default.0x403ff0
push 0
lea eax, [ebp - 0x40c]
push eax
push 8
lea eax, [ebp - 0x500]
push eax
push dword [ebx + 0x18]
call edi
test eax, eax
je 0x40423a
push 0
lea eax, [ebp - 0x40c]
push eax
push 4
lea eax, [ebp - 0x488]
push eax
push dword [ebx + 0x18]
call edi
test eax, eax
je 0x40423a
mov eax, dword [ebp - 0x500]
lea edx, [ebp - 0x448]
push edx
push dword [ebp - 0x488]
mov dword [ebp - 0x434], 0
mov ecx, dword [eax]
push eax
mov dword [ebp - 0x418], 0
call dword [ecx + 0x2c]
test eax, eax
jne 0x404425
mov dword [ebp - 0x410], eax
lea edx, [ebp - 0x410]
mov eax, dword [ebp - 0x448]
push edx
push 0x41d700
push eax
mov ecx, dword [eax]
call dword [ecx]
test eax, eax
jne 0x404419
mov ecx, dword [ebp - 0x410]
test ecx, ecx
je 0x404419
lea edx, [ebp - 0x424]
mov dword [ebp - 0x424], eax
mov eax, dword [ecx]
push edx
push 0
push 0
push 0x12
push ecx
call dword [eax + 0xc]
mov ecx, dword [ebp - 0x424]
test ecx, ecx
je 0x40440d
mov dword [ebp - 0x42c], 0
lea edx, [ebp - 0x42c]
mov eax, dword [ecx]
push edx
push ecx
call dword [eax + 0x1c]
test eax, eax
jne 0x40440d
mov ecx, dword [ebp - 0x42c]
test ecx, ecx
je 0x40440d
mov eax, dword [ecx]
lea edx, [ebp - 0x444]
push edx
push ecx
call dword [eax + 0x10]
test eax, eax
jne 0x404401
mov ecx, dword [ebp - 0x444]
test ecx, ecx
je 0x404401
mov eax, dword [ecx]
lea edx, [ebp - 0x418]
push edx
push ecx
call dword [eax + 0x10]
mov eax, dword [ebp - 0x444]
lea edx, [ebp - 0x434]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
mov eax, dword [ebp - 0x444]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x42c]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x410]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x448]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x434]
cdq
push 0
mov dword [ebp - 0x4d0], eax
lea eax, [ebp - 0x4ec]
push eax
push 8
lea eax, [ebp - 0x4d0]
mov dword [ebp - 0x4cc], edx
push eax
push dword [ebx + 0x18]
call esi
test eax, eax
je 0x404933
mov eax, dword [ebp - 0x418]
push 0
mov dword [ebp - 0x424], eax
lea eax, [ebp - 0x4f0]
push eax
push 4
lea eax, [ebp - 0x424]
push eax
push dword [ebx + 0x18]
call esi
test eax, eax
je 0x404933
jmp case.default.0x403ff0
push 0
lea eax, [ebp - 0x40c]
push eax
push 8
lea eax, [ebp - 0x4b0]
push eax
push dword [ebx + 0x18]
call edi
test eax, eax
je 0x40423a
push 0
lea eax, [ebp - 0x40c]
push eax
push 4
lea eax, [ebp - 0x48c]
push eax
push dword [ebx + 0x18]
call edi
test eax, eax
je 0x40423a
push dword [ebp - 0x48c]
lea eax, [ebp - 0x4e0]
push dword [ebp - 0x4ac]
push dword [ebp - 0x4b0]
push eax
call fcn.00402fa0
mov eax, dword [ebp - 0x4e0]
or eax, dword [ebp - 0x4dc]
jne 0x40452c
mov eax, dword [ebp - 0x4d8]
or eax, dword [ebp - 0x4d4]
jne 0x40452c
push eax
lea eax, [ebp - 0x504]
mov dword [ebp - 0x418], 0xffffffff
push eax
push 4
lea eax, [ebp - 0x418]
push eax
push dword [ebx + 0x18]
call esi
test eax, eax
je 0x404933
jmp case.default.0x403ff0
movups xmm0, xmmword [ebp - 0x4e0]
sub esp, 0x10
mov ecx, ebx
mov eax, esp
movups xmmword [eax], xmm0
call fcn.00403210
jmp case.default.0x403ff0
push 0
lea eax, [ebp - 0x40c]
push eax
push 8
lea eax, [ebp - 0x4b8]
push eax
push dword [ebx + 0x18]
call edi
test eax, eax
je 0x40423a
push 0
lea eax, [ebp - 0x40c]
push eax
push 4
lea eax, [ebp - 0x490]
push eax
push dword [ebx + 0x18]
call edi
test eax, eax
je 0x40423a
push dword [ebp - 0x490]
mov ecx, ebx
push dword [ebp - 0x4b4]
push dword [ebp - 0x4b8]
call fcn.00402b50
jmp case.default.0x403ff0
push 0
lea eax, [ebp - 0x40c]
push eax
push 8
lea eax, [ebp - 0x4c0]
push eax
push dword [ebx + 0x18]
call edi
test eax, eax
je 0x40423a
push 0
lea eax, [ebp - 0x40c]
push eax
push 4
lea eax, [ebp - 0x474]
push eax
push dword [ebx + 0x18]
call edi
test eax, eax
je 0x40423a
push dword [ebp - 0x474]
mov ecx, ebx
push dword [ebp - 0x4bc]
push dword [ebp - 0x4c0]
call fcn.00402810
jmp case.default.0x403ff0
push 0
lea eax, [ebp - 0x40c]
push eax
push 8
lea eax, [ebp - 0x4c8]
push eax
push dword [ebx + 0x18]
call edi
test eax, eax
je 0x40423a
mov eax, dword [ebp - 0x4c8]
xor edi, edi
mov ecx, dword [ebx + 0x230]
xorps xmm0, xmm0
mov dword [ebp - 0x418], eax
mov eax, dword [ebp - 0x4c4]
mov dword [ebp - 0x410], eax
movlpd qword [ebp - 0x430], xmm0
mov dword [ebp - 0x434], edi
test ecx, ecx
je 0x404720
mov eax, dword [ecx]
lea edx, [ebp - 0x454]
push edx
push ecx
call dword [eax + 0x10]
test eax, eax
jne 0x404720
nop dword [eax]
mov eax, dword [ebp - 0x454]
lea edx, [ebp - 0x44c]
push edx
lea edx, [ebp - 0x208]
push edx
mov ecx, dword [eax]
push 0x10
push eax
call dword [ecx + 0x1c]
xor esi, esi
mov dword [ebp - 0x424], eax
cmp dword [ebp - 0x44c], esi
jbe 0x4046f5
mov eax, dword [ebp - 0x410]
lea ecx, [ebp - 0x200]
mov ebx, dword [ecx - 4]
mov edi, dword [ecx - 8]
cmp eax, ebx
jb 0x4046dd
ja 0x4046bc
cmp dword [ebp - 0x418], edi
jb 0x4046dd
mov eax, dword [ecx + 4]
mov edx, edi
add edx, dword [ecx]
adc eax, ebx
cmp dword [ebp - 0x410], eax
jb 0x40473c
ja 0x4046d7
cmp dword [ebp - 0x418], edx
jb 0x40473c
mov eax, dword [ebp - 0x410]
inc esi
add ecx, 0x20
cmp esi, dword [ebp - 0x44c]
jb 0x4046a8
mov ebx, dword [ebp - 0x450]
mov edi, dword [ebp - 0x434]
cmp dword [ebp - 0x424], 0
jne 0x404706
test edi, edi
je 0x404670
mov eax, dword [ebp - 0x454]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
test edi, edi
jne 0x40420f
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x478]
push eax
push 8
lea eax, [ebp - 0x430]
push eax
push dword [ebx + 0x18]
call esi
jmp 0x404215
push 0
lea eax, [ebp - 0x478]
mov dword [ebp - 0x42c], ebx
mov ebx, dword [ebp - 0x450]
push eax
push 8
lea eax, [ebp - 0x430]
mov dword [ebp - 0x434], 1
push eax
push dword [ebx + 0x18]
mov dword [ebp - 0x430], edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
shl esi, 5
sub esp, 0x10
mov eax, esp
mov ecx, ebx
movups xmm0, xmmword [ebp + esi - 0x1f8]
movups xmmword [eax], xmm0
call fcn.00403210
mov edi, 1
jmp 0x4046f5
mov ecx, ebx
call fcn.00403c30
jmp case.default.0x403ff0
push 0
lea eax, [ebp - 0x40c]
push eax
push 8
lea eax, [ebp - 0x4e8]
push eax
push dword [ebx + 0x18]
call edi
test eax, eax
je case.default.0x403ff0
push 0
lea eax, [ebp - 0x40c]
push eax
push 4
lea eax, [ebp - 0x47c]
push eax
push dword [ebx + 0x18]
call edi
test eax, eax
je case.default.0x403ff0
push dword [ebp - 0x47c]
lea eax, [ebp - 0x468]
push dword [ebp - 0x4e4]
push dword [ebp - 0x4e8]
push eax
call fcn.00402fa0
mov eax, dword [ebp - 0x468]
or eax, dword [ebp - 0x464]
jne 0x40481f
mov eax, dword [ebp - 0x460]
or eax, dword [ebp - 0x45c]
je 0x4048f9
mov ecx, dword [ebx + 0x230]
test ecx, ecx
je 0x4048f9
mov eax, dword [ecx]
lea edx, [ebp - 0x480]
push edx
push ecx
call dword [eax + 0x10]
test eax, eax
jne 0x4048f9
mov eax, dword [ebp - 0x480]
lea edx, [ebp - 0x458]
push edx
lea edx, [ebp - 0x408]
push edx
mov ecx, dword [eax]
push 0x20
push eax
call dword [ecx + 0x1c]
test eax, eax
jne 0x4048ed
mov eax, dword [ebp - 0x458]
test eax, eax
je 0x404842
xor edi, edi
test eax, eax
je 0x404842
mov ecx, dword [ebp - 0x468]
lea esi, [ebp - 0x3f0]
cmp ecx, dword [esi - 8]
jne 0x4048e0
mov edx, dword [ebp - 0x464]
cmp edx, dword [esi - 4]
jne 0x4048e0
mov ecx, dword [ebp - 0x460]
cmp ecx, dword [esi]
jne 0x4048da
mov ecx, dword [ebp - 0x45c]
cmp ecx, dword [esi + 4]
jne 0x4048da
mov eax, dword [esi - 0x18]
mov ecx, dword [esi - 0x14]
push 0
mov dword [ebp - 0x470], eax
lea eax, [ebp - 0x41c]
push eax
push 8
lea eax, [ebp - 0x470]
mov dword [ebp - 0x46c], ecx
push eax
push dword [ebx + 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x458]
mov ecx, dword [ebp - 0x468]
inc edi
add esi, 0x20
cmp edi, eax
jb 0x404882
jmp 0x404842
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [ebp - 0x41c]
xorps xmm0, xmm0
push eax
push 8
lea eax, [ebp - 0x470]
movlpd qword [ebp - 0x470], xmm0
push eax
push dword [ebx + 0x18]
call esi
jmp case.default.0x403ff0
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004050db
mov esp, ebp
pop ebp
ret
push 0x424e50
lea eax, [ebp - 0x41c]
mov dword [ebp - 0x41c], str.Write_Error
push eax
call fcn.0040653e
nop
idiv dword [edi]
inc eax
add byte [eax], ah
dec ecx
inc eax
add byte [eax + eax*2 + 0x40], dh
add byte [eax + eax*2 + 0x42690040], ah
inc eax
add byte [ecx + 0x47004042], bl
inc ebp
inc eax
add bh, bh
inc ebp
inc eax
add byte [edi - 0x78ffbfb9], dl
inc esp
inc eax
add byte [ebx - 0x33ffbfbb], ah
inc edx
inc eax
add byte [ebx - 0x33ffbfb9], ah
int3