Function at 0x40a4f0
Capabilities:
Copy file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa0
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 4], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
xor eax, eax
push ebp
push 0x40aa09
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 4]
call fcn.00409e9c
mov dl, 1
mov eax, dword [0x408f3c]
call fcn.004090e8
mov ebx, eax
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.00409174
test al, al
je 0x40a9da
mov eax, dword [0x40aa18]
mov dword [ebp - 0x55], eax
mov al, byte [0x40aa1c]
mov byte [ebp - 0x51], al
mov eax, dword [0x40aa20]
mov dword [ebp - 0x50], eax
mov byte [ebp - 0x4c], 0xc
mov byte [ebp - 0x4b], 9
mov byte [ebp - 0x49], 0
mov byte [ebp - 0x34], 0x26
mov byte [ebp - 0x32], 0
lea eax, [ebp - 0x14]
mov edx, 0x400
call fcn.00403658
mov eax, ebx
call fcn.004090c4
mov edx, eax
mov eax, ebx
call fcn.00408fc4
push eax
mov eax, dword [ebp - 0x14]
call fcn.00403544
mov ecx, 0x400
pop edx
call fcn.00405558
mov byte [ebp - 0x25], 0
mov edx, dword [ebp - 0x14]
mov eax, 0x40aa2c
call fcn.00403610
mov esi, eax
test esi, esi
jle 0x40a5d1
mov byte [ebp - 0x25], 1
mov eax, dword [ebp - 0x14]
cmp byte [eax + esi + 7], 2
jne 0x40a5d1
mov byte [ebp - 0x25], 2
mov edx, dword [ebp - 0x14]
mov eax, 0x40aa3c
call fcn.00403610
test eax, eax
jg 0x40a5f3
mov edx, dword [ebp - 0x14]
mov eax, 0x40aa4c
call fcn.00403610
test eax, eax
jle 0x40a5f7
xor eax, eax
jmp 0x40a659
mov edx, dword [ebp - 0x14]
mov eax, 0x40aa5c
call fcn.00403610
test eax, eax
jg 0x40a619
mov edx, dword [ebp - 0x14]
mov eax, 0x40aa70
call fcn.00403610
test eax, eax
jle 0x40a61d
mov al, 1
jmp 0x40a659
mov edx, dword [ebp - 0x14]
mov eax, 0x40aa84
call fcn.00403610
test eax, eax
jg 0x40a63f
mov edx, dword [ebp - 0x14]
mov eax, 0x40aa94
call fcn.00403610
test eax, eax
jle 0x40a643
mov al, 2
jmp 0x40a659
mov eax, 0x40aaa4
call fcn.0040a1c8
mov eax, ebx
call fcn.004028e4
jmp 0x40a9e1
and eax, 0xff
xor edx, edx
mov dl, byte [ebp - 0x25]
lea edx, [edx + edx*2]
lea edx, [edx*4 + 0x40b284]
mov al, byte [edx + eax*4]
mov byte [ebp - 0x4a], al
mov edx, dword [ebp - 0x14]
mov eax, 0x40aad0
call fcn.00403610
test eax, eax
jge 0x40a69a
mov eax, 0x40aae0
call fcn.0040a1c8
mov eax, ebx
call fcn.004028e4
jmp 0x40a9e1
mov edx, dword [ebp - 0x14]
mov eax, 0x40ab08
call fcn.00403610
mov esi, eax
test esi, esi
jge 0x40a6b9
mov eax, ebx
call fcn.004028e4
jmp 0x40a9e1
mov eax, dword [ebp - 0x14]
mov al, byte [eax + esi + 0xa]
mov byte [ebp - 0x33], al
mov edx, dword [ebp - 0x14]
mov eax, 0x40ab1c
call fcn.00403610
mov esi, eax
test esi, esi
jg 0x40a6e5
mov edx, dword [ebp - 0x14]
mov eax, 0x40ab2c
call fcn.00403610
mov esi, eax
test esi, esi
jg 0x40a6ff
mov eax, 0x40ab3c
call fcn.0040a1c8
mov eax, ebx
call fcn.004028e4
jmp 0x40a9e1
lea eax, [ebp - 0x18]
push eax
mov ecx, esi
dec ecx
mov edx, 1
mov eax, dword [ebp - 0x14]
call fcn.00403588
mov edx, dword [ebp - 0x18]
mov eax, 0x40ab60
call fcn.00403610
mov esi, eax
test esi, esi
jg 0x40a73c
mov eax, 0x40ab3c
call fcn.0040a1c8
mov eax, ebx
call fcn.004028e4
jmp 0x40a9e1
lea eax, [ebp - 0x18]
call fcn.00403550
add eax, esi
mov edi, dword [eax]
lea ecx, [esi + 4]
lea eax, [ebp - 0x18]
mov edx, 1
call fcn.004035c8
mov edx, dword [ebp - 0x18]
mov eax, 0x40ab6c
call fcn.00403610
mov esi, eax
test esi, esi
jg 0x40a781
mov eax, 0x40ab3c
call fcn.0040a1c8
mov eax, ebx
call fcn.004028e4
jmp 0x40a9e1
lea eax, [ebp - 0x18]
call fcn.00403550
lea eax, [eax + esi + 1]
mov esi, dword [eax]
add esi, edi
mov eax, ebx
call fcn.004093d8
mov edx, edi
sub edx, eax
push edx
mov eax, ebx
call fcn.004093dc
pop edx
sub eax, edx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
call fcn.00402544
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x40a7d1
mov eax, 0x40ab78
call fcn.0040a1c8
mov eax, ebx
call fcn.004028e4
jmp 0x40a9e1
mov edx, edi
mov eax, ebx
call fcn.0040908c
mov dword [ebp - 0x1c], eax
mov edx, esi
mov eax, ebx
call fcn.0040908c
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x2c]
call fcn.00405558
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x3c]
push eax
xor eax, eax
mov al, byte [ebp - 0x4a]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
call fcn.0040a314
test eax, eax
je 0x40a829
mov eax, 0x40ab98
call fcn.0040a1c8
mov eax, ebx
call fcn.004028e4
jmp 0x40a9e1
mov ecx, 1
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x20]
call fcn.0040a008
mov dword [ebp - 0x48], eax
mov ecx, 1
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x2c]
call fcn.0040a008
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x40]
sub eax, 4
mov edx, dword [eax]
add edx, esi
mov eax, ebx
call fcn.0040908c
mov esi, eax
mov edx, esi
add edx, 0xf8
mov eax, esi
call fcn.0040a4cc
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x50]
mov edx, 0x1f
call fcn.0040a0a4
mov byte [ebp - 0x31], al
lea edx, [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.00406534
lea edx, [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.00406568
lea eax, [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov edx, 0x40abbc
call fcn.00403470
lea eax, [ebp - 0x5c]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
call fcn.00403470
mov eax, dword [ebp - 0x5c]
call fcn.004064d4
test al, al
jne 0x40a89d
lea eax, [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
call fcn.00403470
push 0xffffffffffffffff
mov eax, dword [ebp - 0x10]
call fcn.00403544
mov esi, eax
push esi
mov eax, dword [ebp - 4]
call fcn.00403544
push eax
call sub.kernel32.dll_CopyFileA
test eax, eax
jne 0x40a90a
mov eax, 0x40abc8
call fcn.0040a1c8
mov eax, ebx
call fcn.004028e4
jmp 0x40a9e1
push 0
push 0x80
push 3
push 0
push 3
push 0xc0000000
push esi
call sub.kernel32.dll_CreateFileA_1
mov esi, eax
cmp esi, 0xffffffff
jne 0x40a93f
mov eax, 0x40abe0
call fcn.0040a1c8
mov eax, ebx
call fcn.004028e4
jmp 0x40a9e1
push 0
push 0
mov edx, 1
mov eax, ebx
call fcn.00409064
push eax
push esi
call sub.kernel32.dll_SetFilePointer_1
push 0
lea eax, [ebp - 0x30]
push eax
push 8
push 0x40abf8
push esi
call sub.kernel32.dll_WriteFile_1
push 0
push 0
mov edx, 2
mov eax, ebx
call fcn.00409064
push eax
push esi
call sub.kernel32.dll_SetFilePointer_1
push 0
lea eax, [ebp - 0x30]
push eax
push 8
push 0x40ac0c
push esi
call sub.kernel32.dll_WriteFile_1
push 0
push 0
mov edx, edi
mov eax, ebx
call fcn.00408fe8
sub eax, 0x25
push eax
push esi
call sub.kernel32.dll_SetFilePointer_1
push 0
lea eax, [ebp - 0x30]
push eax
push 0x25
lea eax, [ebp - 0x55]
push eax
push esi
call sub.kernel32.dll_WriteFile_1
push esi
call sub.kernel32.dll_CloseHandle_1
lea eax, [ebp - 0x60]
mov ecx, 0x40ac20
mov edx, dword [ebp - 0x10]
call fcn.00403470
mov eax, dword [ebp - 0x60]
call fcn.0040a158
mov eax, ebx
call fcn.004028e4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40aa10
lea eax, [ebp - 0x60]
mov edx, 2
call fcn.004031f8
lea eax, [ebp - 0x18]
mov edx, 6
call fcn.004031f8
ret