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

Disassembly:
push 0xffffffffffffffff
push 0x459d1f
mov eax, dword fs:[0]
push eax
sub esp, 0xdc
mov eax, dword [0x477c1c]
xor eax, esp
mov dword [esp + 0xd8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x477c1c]
xor eax, esp
push eax
lea eax, [esp + 0xf0]
mov dword fs:[0], eax
mov ebp, ecx
mov dword [esp + 0x14], ebp
mov dword [esp + 0xf8], 1
push str..hdr
lea eax, [esp + 0x104]
push eax
lea ecx, [esp + 0xb0]
push ecx
call fcn.00409410
mov byte [esp + 0x104], 2
push str..src
lea edx, [esp + 0x110]
push edx
lea eax, [esp + 0x68]
push eax
call fcn.00409410
mov byte [esp + 0x110], 3
push str..src2
lea ecx, [esp + 0x11c]
push ecx
lea edx, [esp + 0x90]
push edx
call fcn.00409410
add esp, 0x24
mov byte [esp + 0xf8], 4
xor ebx, ebx
mov esi, 0xf
mov dword [esp + 0xa4], esi
mov dword [esp + 0xa0], ebx
mov byte [esp + 0x90], bl
mov byte [esp + 0xf8], 5
xor edi, edi
mov dword [esp + 0x2c], ebx
cmp dword [ebp + 0x44], ebx
jne 0x4106ad
mov byte [esp + 0xf8], 4
mov edi, 0x10
cmp dword [esp + 0xa4], edi
jb 0x4105ab
mov eax, dword [esp + 0x90]
push eax
call fcn.00421b49
add esp, 4
mov dword [esp + 0xa4], esi
mov dword [esp + 0xa0], ebx
mov byte [esp + 0x90], bl
mov byte [esp + 0xf8], 3
cmp dword [esp + 0x88], edi
jb 0x4105de
mov ecx, dword [esp + 0x74]
push ecx
call fcn.00421b49
add esp, 4
mov dword [esp + 0x88], esi
mov dword [esp + 0x84], ebx
mov byte [esp + 0x74], bl
mov byte [esp + 0xf8], 2
cmp dword [esp + 0x6c], edi
jb 0x41060b
mov edx, dword [esp + 0x58]
push edx
call fcn.00421b49
add esp, 4
mov dword [esp + 0x6c], esi
mov dword [esp + 0x68], ebx
mov byte [esp + 0x58], bl
mov byte [esp + 0xf8], 1
cmp dword [esp + 0xc0], edi
jb 0x410638
mov eax, dword [esp + 0xac]
push eax
call fcn.00421b49
add esp, 4
mov dword [esp + 0xc0], esi
mov dword [esp + 0xbc], ebx
mov byte [esp + 0xac], bl
mov byte [esp + 0xf8], bl
cmp dword [esp + 0x118], edi
jb 0x41066d
mov ecx, dword [esp + 0x104]
push ecx
call fcn.00421b49
add esp, 4
mov dword [esp + 0x118], esi
mov dword [esp + 0x114], ebx
mov byte [esp + 0x104], bl
mov dword [esp + 0xf8], 0xffffffff
cmp dword [esp + 0x134], edi
jb 0x4106a6
mov edx, dword [esp + 0x120]
push edx
call fcn.00421b49
add esp, 4
xor al, al
jmp 0x410ab0
cmp dword [esp + 0x6c], 0x10
mov eax, dword [esp + 0x58]
jae 0x4106bc
lea eax, [esp + 0x58]
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x4106e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x410585
cmp dword [esp + 0x88], 0x10
mov eax, dword [esp + 0x74]
jae 0x4106f7
lea eax, [esp + 0x74]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x28], eax
cmp eax, 0xffffffff
jne 0x410728
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x410585
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0x40]
mov esi, dword [ecx]
mov ecx, dword [eax + 0x28]
add eax, 0x28
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], esi
nop
mov eax, dword [esp + 0x14]
mov edx, dword [eax + 0x40]
add eax, 0x28
mov eax, dword [eax]
mov dword [esp + 0x34], edx
cmp ecx, ebx
je 0x410758
cmp ecx, eax
je 0x410761
call fcn.004408d8
mov ecx, dword [esp + 0x18]
cmp esi, dword [esp + 0x34]
je 0x4108d8
cmp ecx, ebx
jne 0x4108ca
call fcn.004408d8
mov ecx, dword [esp + 0x18]
xor eax, eax
cmp esi, dword [eax + 0x18]
jne 0x41078c
call fcn.004408d8
mov ecx, dword [esp + 0x18]
mov eax, dword [esi + 0xc]
mov dword [esp + 0x20], eax
cmp ecx, ebx
jne 0x4108d1
call fcn.004408d8
xor ecx, ecx
cmp esi, dword [ecx + 0x18]
jne 0x4107ac
call fcn.004408d8
add esi, 0x10
push esi
lea ecx, [esp + 0xc8]
call fcn.0040e680
mov byte [esp + 0xf8], 6
mov ecx, dword [esp + 0xe8]
inc ecx
push ecx
mov dword [esp + 0x28], ebx
call fcn.00442266
mov edx, dword [esp + 0xe8]
add esp, 4
push ebx
push ebx
push edx
push ebp
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esp + 0xe8]
push ebx
lea eax, [esp + 0x30]
push eax
push ecx
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0xe8]
mov ecx, dword [esp + 0x28]
push ebx
lea edx, [esp + 0x28]
push edx
push eax
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call fcn.00442189
mov ecx, dword [esp + 0x18]
add esp, 4
lea edx, [esp + 0x20]
mov dword [esp + 0xe4], edi
add edi, dword [esp + 0xe8]
push edx
add ecx, 0x28
call fcn.0040ff60
push 0xffffffffffffffff
mov esi, eax
push ebx
lea eax, [esp + 0xcc]
push eax
mov ecx, esi
call fcn.00401cc0
mov ecx, dword [esp + 0xe0]
push 1
push ebx
mov dword [esi + 0x1c], ecx
mov edx, dword [esp + 0xec]
push ebx
mov dword [esi + 0x20], edx
mov eax, dword [esp + 0xf4]
push ebx
lea ecx, [esp + 0x48]
push ecx
mov dword [esi + 0x24], eax
call dword [sym.imp.USER32.dll_PeekMessageA]
cmp eax, ebx
je 0x4108a0
lea edx, [esp + 0x38]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
mov byte [esp + 0xf8], 5
lea ecx, [esp + 0xc4]
call fcn.0040e480
lea ecx, [esp + 0x18]
call fcn.0040e210
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
jmp 0x410740
mov eax, dword [ecx]
jmp 0x41077e
mov ecx, dword [ecx]
jmp 0x4107a2
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call esi
mov ecx, dword [esp + 0x28]
push ecx
call esi
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0xcc]
mov esi, 0xf
mov dword [ecx + 0x18], esi
mov dword [ecx + 0x14], ebx
push edx
mov byte [ecx + 4], bl
call fcn.00401cc0
mov byte [esp + 0x114], 7
mov byte [esp + 0x114], 5
mov edi, dword [esp + 0x30]
mov ecx, edi
call fcn.0040e710
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x94]
mov dword [ecx + 0x18], esi
mov dword [ecx + 0x14], ebx
push eax
mov byte [ecx + 4], bl
call fcn.00401cc0
mov byte [esp + 0x114], 8
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x5c], esp
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x94]
mov dword [ecx + 0x18], esi
mov dword [ecx + 0x14], ebx
push edx
mov byte [ecx + 4], bl
call fcn.00401cc0
mov byte [esp + 0x130], 9
mov byte [esp + 0x130], 5
mov ecx, edi
call fcn.0040e970
mov byte [esp + 0xf8], 4
mov edi, 0x10
cmp dword [esp + 0xa4], edi
jb 0x4109b3
mov eax, dword [esp + 0x90]
push eax
call fcn.00421b49
add esp, 4
mov dword [esp + 0xa4], esi
mov dword [esp + 0xa0], ebx
mov byte [esp + 0x90], bl
mov byte [esp + 0xf8], 3
cmp dword [esp + 0x88], edi
jb 0x4109e6
mov ecx, dword [esp + 0x74]
push ecx
call fcn.00421b49
add esp, 4
mov dword [esp + 0x88], esi
mov dword [esp + 0x84], ebx
mov byte [esp + 0x74], bl
mov byte [esp + 0xf8], 2
cmp dword [esp + 0x6c], edi
jb 0x410a13
mov edx, dword [esp + 0x58]
push edx
call fcn.00421b49
add esp, 4
mov dword [esp + 0x6c], esi
mov dword [esp + 0x68], ebx
mov byte [esp + 0x58], bl
mov byte [esp + 0xf8], 1
cmp dword [esp + 0xc0], edi
jb 0x410a40
mov eax, dword [esp + 0xac]
push eax
call fcn.00421b49
add esp, 4
mov dword [esp + 0xc0], esi
mov dword [esp + 0xbc], ebx
mov byte [esp + 0xac], bl
mov byte [esp + 0xf8], bl
cmp dword [esp + 0x118], edi
jb 0x410a75
mov ecx, dword [esp + 0x104]
push ecx
call fcn.00421b49
add esp, 4
mov dword [esp + 0x118], esi
mov dword [esp + 0x114], ebx
mov byte [esp + 0x104], bl
mov dword [esp + 0xf8], 0xffffffff
cmp dword [esp + 0x134], edi
jb 0x410aae
mov edx, dword [esp + 0x120]
push edx
call fcn.00421b49
add esp, 4
mov al, 1
mov byte [esp + 0x120], bl
mov dword [esp + 0x130], ebx
mov dword [esp + 0x134], esi
mov ecx, dword [esp + 0xf0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xd8]
xor ecx, esp
call fcn.0044014d
add esp, 0xe8
ret 0x38