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

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 2
add esp, 0xfffff004
push eax
dec eax
jne 0x40434d
mov eax, dword [ebp - 4]
add esp, 0xffffff80
mov eax, 0x50d388
call fcn.004f505c
mov dword [ebp - 0x40], 2
lea edx, [ebp + 0x10]
lea eax, [ebp + 0x10]
call fcn.00503970
inc dword [ebp - 0x40]
mov word [ebp - 0x4c], 0xc
lea edx, [ebp + 0xc]
lea eax, [ebp + 0xc]
call fcn.00503970
inc dword [ebp - 0x40]
mov byte [ebp - 0x5d], 0
mov word [ebp - 0x4c], 0x18
lea eax, [ebp - 4]
call fcn.00401be8
inc dword [ebp - 0x40]
mov word [ebp - 0x4c], 0xc
mov word [ebp - 0x4c], 0x24
lea eax, [ebp - 8]
call fcn.00401be8
inc dword [ebp - 0x40]
mov word [ebp - 0x4c], 0xc
mov word [ebp - 0x4c], 0x30
lea eax, [ebp - 0xc]
call fcn.00401be8
mov edx, eax
inc dword [ebp - 0x40]
mov eax, dword [ebp + 0x10]
call fcn.0043511c
lea edx, [ebp - 0xc]
lea eax, [ebp - 4]
call fcn.005039dc
dec dword [ebp - 0x40]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.005039ac
mov word [ebp - 0x4c], 0x3c
lea eax, [ebp - 4]
call fcn.00402470
mov edx, eax
lea eax, [ebp - 0x10]
call fcn.00503938
inc dword [ebp - 0x40]
mov eax, dword [eax]
call fcn.00434bb4
dec dword [ebp - 0x40]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.005039ac
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x374]
xor edx, edx
call fcn.004a0028
push 0
push 0x80
push 2
push 0
push 1
push 0xc0000000
lea eax, [ebp + 0x10]
call fcn.00402470
push eax
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x7c], 0xffffffff
jne 0x404557
call sub.KERNEL32.DLL_GetLastError
mov dword [ebp - 0x84], eax
push 0
push dword [ebp + 0x10]
push dword [ebp - 0x84]
mov word [ebp - 0x4c], 0x48
lea eax, [ebp - 0x14]
call fcn.00401be8
mov edx, eax
inc dword [ebp - 0x40]
mov eax, 0xfca4
call fcn.00434970
lea eax, [ebp - 0x14]
call fcn.00402470
push eax
lea edx, [ebp - 8]
push edx
call fcn.00503b1c
add esp, 0x10
call fcn.00402470
push eax
lea eax, [ebp - 0x18]
call fcn.00401be8
mov edx, eax
inc dword [ebp - 0x40]
mov eax, 0xc349
call fcn.00434970
lea eax, [ebp - 0x18]
call fcn.00402470
mov ecx, eax
mov edx, dword [0x519ca8]
mov eax, dword [edx]
pop edx
call fcn.00503898
dec dword [ebp - 0x40]
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.005039ac
dec dword [ebp - 0x40]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.005039ac
xor eax, eax
push eax
dec dword [ebp - 0x40]
lea eax, [ebp - 8]
mov edx, 2
call fcn.005039ac
dec dword [ebp - 0x40]
lea eax, [ebp - 4]
mov edx, 2
call fcn.005039ac
dec dword [ebp - 0x40]
lea eax, [ebp + 0xc]
mov edx, 2
call fcn.005039ac
dec dword [ebp - 0x40]
lea eax, [ebp + 0x10]
mov edx, 2
call fcn.005039ac
pop eax
mov edx, dword [ebp - 0x5c]
mov dword fs:[0], edx
jmp 0x404a89
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
lea eax, [ebp + 0xc]
call fcn.00402470
push eax
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 0x80], eax
cmp dword [ebp - 0x80], 0xffffffff
jne 0x40467d
call sub.KERNEL32.DLL_GetLastError
mov dword [ebp - 0x84], eax
push 0
push dword [ebp + 0xc]
push dword [ebp - 0x84]
mov word [ebp - 0x4c], 0x54
lea eax, [ebp - 0x1c]
call fcn.00401be8
mov edx, eax
inc dword [ebp - 0x40]
mov eax, 0xfca4
call fcn.00434970
lea eax, [ebp - 0x1c]
call fcn.00402470
push eax
lea edx, [ebp - 8]
push edx
call fcn.00503b1c
add esp, 0x10
call fcn.00402470
push eax
lea eax, [ebp - 0x20]
call fcn.00401be8
mov edx, eax
inc dword [ebp - 0x40]
mov eax, 0xc349
call fcn.00434970
lea eax, [ebp - 0x20]
call fcn.00402470
mov ecx, eax
mov edx, dword [0x519ca8]
mov eax, dword [edx]
pop edx
call fcn.00503898
dec dword [ebp - 0x40]
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.005039ac
dec dword [ebp - 0x40]
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.005039ac
push dword [ebp - 0x7c]
call sub.KERNEL32.DLL_CloseHandle
mov al, byte [ebp - 0x5d]
push eax
dec dword [ebp - 0x40]
lea eax, [ebp - 8]
mov edx, 2
call fcn.005039ac
dec dword [ebp - 0x40]
lea eax, [ebp - 4]
mov edx, 2
call fcn.005039ac
dec dword [ebp - 0x40]
lea eax, [ebp + 0xc]
mov edx, 2
call fcn.005039ac
dec dword [ebp - 0x40]
lea eax, [ebp + 0x10]
mov edx, 2
call fcn.005039ac
pop eax
mov edx, dword [ebp - 0x5c]
mov dword fs:[0], edx
jmp 0x404a89
add esp, 0xffffffd8
lea eax, [ebp + 0xc]
call fcn.00402470
push eax
lea edx, [esp + 4]
push edx
call fcn.00404a90
add esp, 8
inc dword [ebp - 0x40]
mov word [ebp - 0x4c], 0x6c
mov word [ebp - 0x4c], 0x60
dec dword [ebp - 0x40]
call fcn.004040d0
add esp, 0x28
mov dword [ebp + 0x14], eax
mov dword [ebp + 0x18], edx
cmp dword [ebp + 0x18], 0xffffffff
jne 0x4047cb
cmp dword [ebp + 0x14], 0xffffffff
jne 0x4047cb
call sub.KERNEL32.DLL_GetLastError
mov dword [ebp - 0x84], eax
push 0
push dword [ebp + 0xc]
push dword [ebp - 0x84]
mov word [ebp - 0x4c], 0x78
lea eax, [ebp - 0x24]
call fcn.00401be8
mov edx, eax
inc dword [ebp - 0x40]
mov eax, 0xfca7
call fcn.00434970
lea eax, [ebp - 0x24]
call fcn.00402470
push eax
lea edx, [ebp - 8]
push edx
call fcn.00503b1c
add esp, 0x10
call fcn.00402470
push eax
lea eax, [ebp - 0x28]
call fcn.00401be8
mov edx, eax
inc dword [ebp - 0x40]
mov eax, 0xc349
call fcn.00434970
lea eax, [ebp - 0x28]
call fcn.00402470
mov ecx, eax
mov edx, dword [0x519ca8]
mov eax, dword [edx]
pop edx
call fcn.00503898
dec dword [ebp - 0x40]
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.005039ac
dec dword [ebp - 0x40]
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.005039ac
push dword [ebp - 0x80]
call sub.KERNEL32.DLL_CloseHandle
push dword [ebp - 0x7c]
call sub.KERNEL32.DLL_CloseHandle
mov al, byte [ebp - 0x5d]
push eax
dec dword [ebp - 0x40]
lea eax, [ebp - 8]
mov edx, 2
call fcn.005039ac
dec dword [ebp - 0x40]
lea eax, [ebp - 4]
mov edx, 2
call fcn.005039ac
dec dword [ebp - 0x40]
lea eax, [ebp + 0xc]
mov edx, 2
call fcn.005039ac
dec dword [ebp - 0x40]
lea eax, [ebp + 0x10]
mov edx, 2
call fcn.005039ac
pop eax
mov edx, dword [ebp - 0x5c]
mov dword fs:[0], edx
jmp 0x404a89
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x6c], 0
jmp 0x4049fd
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
sub eax, dword [ebp - 0x70]
sbb edx, dword [ebp - 0x6c]
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], edx
cmp dword [ebp - 0x64], 0
jne 0x404801
cmp dword [ebp - 0x68], 0x2000
jbe 0x404811
jmp 0x404803
jle 0x404811
mov dword [ebp - 0x68], 0x2000
mov dword [ebp - 0x64], 0
xor ecx, ecx
mov dword [ebp - 0x78], ecx
push 0
lea eax, [ebp - 0x78]
push eax
mov eax, dword [ebp - 0x68]
push eax
lea edx, [ebp - 0x2084]
push edx
push dword [ebp - 0x80]
call sub.KERNEL32.DLL_ReadFile
mov eax, dword [ebp - 0x78]
xor edx, edx
cmp edx, dword [ebp - 0x64]
jne 0x40483c
cmp eax, dword [ebp - 0x68]
je 0x4048e4
call sub.KERNEL32.DLL_GetLastError
mov dword [ebp - 0x84], eax
push 0
push dword [ebp + 0xc]
push dword [ebp - 0x84]
mov word [ebp - 0x4c], 0x84
lea eax, [ebp - 0x2c]
call fcn.00401be8
mov edx, eax
inc dword [ebp - 0x40]
mov eax, 0xfca7
call fcn.00434970
lea eax, [ebp - 0x2c]
call fcn.00402470
push eax
lea edx, [ebp - 8]
push edx
call fcn.00503b1c
add esp, 0x10
call fcn.00402470
push eax
lea eax, [ebp - 0x30]
call fcn.00401be8
mov edx, eax
inc dword [ebp - 0x40]
mov eax, 0xc349
call fcn.00434970
lea eax, [ebp - 0x30]
call fcn.00402470
mov ecx, eax
mov edx, dword [0x519ca8]
mov eax, dword [edx]
pop edx
call fcn.00503898
dec dword [ebp - 0x40]
lea eax, [ebp - 0x30]
mov edx, 2
call fcn.005039ac
dec dword [ebp - 0x40]
lea eax, [ebp - 0x2c]
mov edx, 2
call fcn.005039ac
jmp 0x404a19
mov eax, dword [ebp - 0x70]
mov edx, dword [ebp - 0x6c]
add eax, dword [ebp - 0x68]
adc edx, dword [ebp - 0x64]
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], edx
xor ecx, ecx
mov dword [ebp - 0x74], ecx
push 0
lea eax, [ebp - 0x74]
push eax
mov eax, dword [ebp - 0x68]
push eax
lea edx, [ebp - 0x2084]
push edx
push dword [ebp - 0x7c]
call sub.KERNEL32.DLL_WriteFile
mov eax, dword [ebp - 0x74]
xor edx, edx
cmp edx, dword [ebp - 0x64]
jne 0x404921
cmp eax, dword [ebp - 0x68]
je 0x4049c6
call sub.KERNEL32.DLL_GetLastError
mov dword [ebp - 0x84], eax
push 0
push dword [ebp + 0x10]
push dword [ebp - 0x84]
mov word [ebp - 0x4c], 0x90
lea eax, [ebp - 0x34]
call fcn.00401be8
mov edx, eax
inc dword [ebp - 0x40]
mov eax, 0xfc9e
call fcn.00434970
lea eax, [ebp - 0x34]
call fcn.00402470
push eax
lea edx, [ebp - 8]
push edx
call fcn.00503b1c
add esp, 0x10
call fcn.00402470
push eax
lea eax, [ebp - 0x38]
call fcn.00401be8
mov edx, eax
inc dword [ebp - 0x40]
mov eax, 0xc349
call fcn.00434970
lea eax, [ebp - 0x38]
call fcn.00402470
mov ecx, eax
mov edx, dword [0x519ca8]
mov eax, dword [edx]
pop edx
call fcn.00503898
dec dword [ebp - 0x40]
lea eax, [ebp - 0x38]
mov edx, 2
call fcn.005039ac
dec dword [ebp - 0x40]
lea eax, [ebp - 0x34]
mov edx, 2
call fcn.005039ac
jmp 0x404a19
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push 0
push 0x64
mov eax, dword [ebp - 0x70]
mov edx, dword [ebp - 0x6c]
call fcn.004fbe98
call fcn.004fbebb
mov edx, eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x374]
call fcn.004a0028
mov edx, dword [0x519ca8]
mov eax, dword [edx]
call fcn.0047f174
mov eax, dword [ebp - 0x70]
mov edx, dword [ebp - 0x6c]
cmp edx, dword [ebp + 0x18]
jne 0x404a13
cmp eax, dword [ebp + 0x14]
jb 0x4047de
jmp 0x404a19
jl 0x4047de
push dword [ebp - 0x7c]
call sub.KERNEL32.DLL_CloseHandle
push dword [ebp - 0x80]
call sub.KERNEL32.DLL_CloseHandle
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
cmp edx, dword [ebp - 0x6c]
jne 0x404a37
cmp eax, dword [ebp - 0x70]
sete al
and eax, 1
push eax
dec dword [ebp - 0x40]
lea eax, [ebp - 8]
mov edx, 2
call fcn.005039ac
dec dword [ebp - 0x40]
lea eax, [ebp - 4]
mov edx, 2
call fcn.005039ac
dec dword [ebp - 0x40]
lea eax, [ebp + 0xc]
mov edx, 2
call fcn.005039ac
dec dword [ebp - 0x40]
lea eax, [ebp + 0x10]
mov edx, 2
call fcn.005039ac
pop eax
mov edx, dword [ebp - 0x5c]
mov dword fs:[0], edx
mov esp, ebp
pop ebp
ret