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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x504
mov eax, dword [section..data]
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 0x40425a
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 0x40425a
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.0x404010
jmp dword [eax*4 + 0x404970]
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 0x40425a
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.0x404010
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.0x404010
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 0x40425a
mov eax, dword [ebp - 0x4f8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
jmp case.default.0x404010
mov ecx, dword [ebx + 0x22c]
test ecx, ecx
je case.default.0x404010
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 0x404270
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.00410323
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 0x404216
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 0x404170
test edi, edi
je 0x404223
push edi
call fcn.004100f7
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 0x404000
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.0x404010
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 0x40425a
push dword [ebp - 0x49c]
mov ecx, ebx
push dword [ebp - 0x4a0]
call fcn.00402140
jmp case.default.0x404010
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 0x40425a
push dword [ebp - 0x4a4]
mov ecx, ebx
push dword [ebp - 0x4a8]
call fcn.00402590
jmp case.default.0x404010
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 0x40425a
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 0x40425a
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 0x404445
mov dword [ebp - 0x410], eax
lea edx, [ebp - 0x410]
mov eax, dword [ebp - 0x448]
push edx
push 0x41d460
push eax
mov ecx, dword [eax]
call dword [ecx]
test eax, eax
jne 0x404439
mov ecx, dword [ebp - 0x410]
test ecx, ecx
je 0x404439
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 0x40442d
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 0x40442d
mov ecx, dword [ebp - 0x42c]
test ecx, ecx
je 0x40442d
mov eax, dword [ecx]
lea edx, [ebp - 0x444]
push edx
push ecx
call dword [eax + 0x10]
test eax, eax
jne 0x404421
mov ecx, dword [ebp - 0x444]
test ecx, ecx
je 0x404421
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 0x404953
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 0x404953
jmp case.default.0x404010
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 0x40425a
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 0x40425a
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 0x40454c
mov eax, dword [ebp - 0x4d8]
or eax, dword [ebp - 0x4d4]
jne 0x40454c
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 0x404953
jmp case.default.0x404010
movups xmm0, xmmword [ebp - 0x4e0]
sub esp, 0x10
mov ecx, ebx
mov eax, esp
movups xmmword [eax], xmm0
call fcn.00403210
jmp case.default.0x404010
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 0x40425a
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 0x40425a
push dword [ebp - 0x490]
mov ecx, ebx
push dword [ebp - 0x4b4]
push dword [ebp - 0x4b8]
call fcn.00402b50
jmp case.default.0x404010
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 0x40425a
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 0x40425a
push dword [ebp - 0x474]
mov ecx, ebx
push dword [ebp - 0x4bc]
push dword [ebp - 0x4c0]
call fcn.00402810
jmp case.default.0x404010
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 0x40425a
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 0x404740
mov eax, dword [ecx]
lea edx, [ebp - 0x454]
push edx
push ecx
call dword [eax + 0x10]
test eax, eax
jne 0x404740
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 0x404715
mov eax, dword [ebp - 0x410]
lea ecx, [ebp - 0x200]
mov ebx, dword [ecx - 4]
mov edi, dword [ecx - 8]
cmp eax, ebx
jb 0x4046fd
ja 0x4046dc
cmp dword [ebp - 0x418], edi
jb 0x4046fd
mov eax, dword [ecx + 4]
mov edx, edi
add edx, dword [ecx]
adc eax, ebx
cmp dword [ebp - 0x410], eax
jb 0x40475c
ja 0x4046f7
cmp dword [ebp - 0x418], edx
jb 0x40475c
mov eax, dword [ebp - 0x410]
inc esi
add ecx, 0x20
cmp esi, dword [ebp - 0x44c]
jb 0x4046c8
mov ebx, dword [ebp - 0x450]
mov edi, dword [ebp - 0x434]
cmp dword [ebp - 0x424], 0
jne 0x404726
test edi, edi
je 0x404690
mov eax, dword [ebp - 0x454]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
test edi, edi
jne 0x40422f
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 0x404235
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 0x404715
mov ecx, ebx
call fcn.00403c30
jmp case.default.0x404010
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.0x404010
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.0x404010
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 0x40483f
mov eax, dword [ebp - 0x460]
or eax, dword [ebp - 0x45c]
je 0x404919
mov ecx, dword [ebx + 0x230]
test ecx, ecx
je 0x404919
mov eax, dword [ecx]
lea edx, [ebp - 0x480]
push edx
push ecx
call dword [eax + 0x10]
test eax, eax
jne 0x404919
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 0x40490d
mov eax, dword [ebp - 0x458]
test eax, eax
je 0x404862
xor edi, edi
test eax, eax
je 0x404862
mov ecx, dword [ebp - 0x468]
lea esi, [ebp - 0x3f0]
cmp ecx, dword [esi - 8]
jne 0x404900
mov edx, dword [ebp - 0x464]
cmp edx, dword [esi - 4]
jne 0x404900
mov ecx, dword [ebp - 0x460]
cmp ecx, dword [esi]
jne 0x4048fa
mov ecx, dword [ebp - 0x45c]
cmp ecx, dword [esi + 4]
jne 0x4048fa
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 0x4048a2
jmp 0x404862
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.0x404010
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 0x424880
lea eax, [ebp - 0x41c]
mov dword [ebp - 0x41c], str.Write_Error
push eax
call fcn.0040656e
nop
pop ss
inc eax
inc eax
add byte [eax + 0x49], al
inc eax
add byte [eax + eax*2 + 0x40c40040], dl
inc eax
add byte [ecx - 0x46ffbfbe], cl
inc edx
inc eax
add byte [edi + 0x45], ah
inc eax
add byte [edi], bl
inc esi
inc eax
add byte [edi - 0x58ffbfb9], dh
inc esp
inc eax
add bl, al
inc ebp
inc eax
add ah, ch
inc edx
inc eax
add bl, al
inc edi
inc eax
add ah, cl
int3