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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6f4
mov eax, dword [0x49e014]
xor eax, esp
mov dword [esp + 0x6f0], eax
push ebx
push esi
push edi
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push dword [0x4a05dc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [esp + 0x1c], ebx
cmp ebx, 0xffffffff
jne 0x40b70e
lea eax, [ebx + 0x65]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6f0]
xor ecx, esp
call fcn.00460901
mov esp, ebp
pop ebp
ret
mov ecx, ebx
call fcn.0040b4b0
mov esi, eax
cmp esi, 0xffffffff
jne 0x40b726
mov ebx, 0x65
jmp 0x40bfee
push 0
push 0
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [esp + 0x34]
push 0
push eax
push 0x20
push 0x4a0554
push ebx
call edi
test eax, eax
je 0x40bfdb
mov eax, dword [esp + 0x34]
cmp eax, 0xffffffff
jne 0x40b764
mov ebx, 0x40000001
jmp 0x40bfee
cmp eax, 0x20
je 0x40b773
mov ebx, 0x40000002
jmp 0x40bfee
mov eax, dword [0x4a0560]
xor ebx, ebx
test eax, eax
je 0x40b788
add eax, 0xffffffe0
add eax, esi
mov dword [0x4a0560], eax
imul eax, dword [0x4a0570], 0x104
push 2
add eax, 2
push eax
call fcn.004643e4
add esp, 8
mov dword [esp + 0x44], eax
mov dword [0x4a079c], eax
test eax, eax
jne 0x40b7b5
lea ebx, [eax + 0x66]
jmp 0x40bfee
xor ecx, ecx
mov dword [eax], ecx
mov dword [esp + 0x34], ecx
cmp dword [0x4a0570], ecx
jle 0x40bfee
mov eax, dword [esp + 0x20]
mov dword [esp + 0x4c], eax
mov ebx, dword [esp + 0x1c]
lea eax, [esp + 0x58]
push 0
push eax
push 2
lea eax, [esp + 0x34]
push eax
push ebx
call edi
test eax, eax
je 0x40bfdb
mov eax, dword [esp + 0x58]
cmp eax, 0xffffffff
je 0x40b75a
cmp eax, 2
jne 0x40b769
mov ax, word [esp + 0x28]
test ax, ax
je 0x40b71c
mov ecx, 0x104
cmp ax, cx
jae 0x40b71c
movzx esi, ax
lea eax, [esp + 0x5c]
push 0
push eax
add esi, esi
lea eax, [esp + 0xe8]
push esi
push eax
push ebx
call edi
test eax, eax
je 0x40bfdb
mov eax, dword [esp + 0x5c]
cmp eax, 0xffffffff
je 0x40b75a
cmp eax, esi
jne 0x40b769
movzx eax, word [esp + 0x28]
add eax, eax
cmp eax, 0x208
jae 0x40c00f
xor ecx, ecx
mov word [esp + eax + 0xe0], cx
xor eax, eax
xor cl, cl
mov word [esp + 0x2e8], ax
call fcn.0040c020
mov ecx, eax
test ecx, ecx
je 0x40b8a1
lea edx, [esp + 0x2e8]
sub edx, ecx
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x40b891
lea edx, [esp + 0xe0]
mov esi, edx
nop word [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x40b8b0
lea edi, [esp + 0x2e8]
sub edx, esi
add edi, 0xfffffffe
nop word [eax + eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x40b8d0
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x44]
lea ecx, [esp + 0x2e8]
mov edx, esi
mov eax, ecx
sub edx, eax
nop dword [eax + eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x40b900
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b915
sub ecx, edx
xor eax, eax
sar ecx, 1
lea edx, [esp + 0x68]
push 4
lea esi, [esi + ecx*2]
mov ecx, ebx
add esi, 2
mov dword [esp + 0x48], esi
mov word [esi], ax
call fcn.0040b3d0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x40bfee
lea ecx, [esp + 0x2e8]
call fcn.0040b1c0
test eax, eax
jne 0x40bfd4
lea ecx, [esp + 0x2e8]
call fcn.0040b3b0
mov edi, eax
mov dword [esp + 0x10], edi
cmp edi, 0xffffffff
je 0x40bfcd
lea eax, [esp + 0xe0]
push str.mmfs2.dll
push eax
call fcn.00465538
mov esi, dword [esp + 0x24]
add esp, 8
mov ecx, esi
push 4
test eax, eax
jne 0x40bc09
lea edx, [esp + 0x34]
call fcn.0040b3d0
mov ebx, eax
add esp, 4
mov dword [esp + 0x18], ebx
test ebx, ebx
jne 0x40bfc4
push 1
push eax
push eax
mov eax, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call eax
mov edi, eax
push 0x1e8480
mov dword [esp + 0x30], edi
call fcn.00465708
mov esi, eax
add esp, 4
mov dword [esp + 0x14], esi
test esi, esi
je 0x40bbe4
push dword [esp + 0x30]
call fcn.00465708
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
je 0x40bbdb
push dword [esp + 0x30]
mov ecx, dword [esp + 0x20]
mov edx, eax
call fcn.0040b3d0
mov ebx, eax
add esp, 4
mov dword [esp + 0x18], ebx
test ebx, ebx
jne 0x40bbcf
mov eax, dword [esp + 0x20]
mov ebx, 0x1e8480
push 0x1bcc
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x34]
push 1
push 0
mov dword [esp + 0x24], ebx
mov dword [esp + 0x7c], eax
mov dword [esp + 0x84], esi
mov dword [esp + 0x88], ebx
mov dword [esp + 0x90], 0
mov dword [esp + 0x98], fcn.0045cfe0
mov dword [esp + 0xa0], 0
mov dword [esp + 0x9c], 0x45d000
call fcn.0045cfe0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x40ba92
lea esi, [eax - 4]
jmp 0x40bb8c
mov dword [edi + 0x34], 0
lea ecx, [esp + 0x6c]
mov dword [esp + 0x88], edi
mov dword [edi + 8], 1
mov dword [edi + 0x24], 0xf
call fcn.0045d8f0
mov esi, eax
test esi, esi
je 0x40bae2
push edi
push dword [esp + 0x98]
call dword [esp + 0x98]
add esp, 8
mov dword [esp + 0x88], 0
test esi, esi
jne 0x40bb90
lea ecx, [esp + 0x6c]
call fcn.0045dab0
mov esi, eax
cmp esi, 1
je 0x40bb42
mov ebx, dword [esp + 0x88]
test ebx, ebx
je 0x40bb2b
mov edi, dword [esp + 0x90]
test edi, edi
je 0x40bb2b
mov ecx, dword [ebx + 0x34]
mov eax, dword [esp + 0x94]
test ecx, ecx
je 0x40bb24
push ecx
push eax
call edi
mov eax, dword [esp + 0x9c]
add esp, 8
push ebx
push eax
call edi
add esp, 8
cmp esi, 2
je 0x40bb90
cmp esi, 0xfffffffb
jne 0x40bb3c
cmp dword [esp + 0x70], 0
je 0x40bb90
mov ebx, dword [esp + 0x18]
jmp 0x40bb8c
mov edi, dword [esp + 0x88]
mov ebx, dword [esp + 0x80]
mov dword [esp + 0x18], ebx
test edi, edi
je 0x40bb87
mov esi, dword [esp + 0x90]
test esi, esi
je 0x40bb87
mov eax, dword [edi + 0x34]
mov ebx, dword [esp + 0x94]
test eax, eax
je 0x40bb78
push eax
push ebx
call esi
add esp, 8
push edi
push ebx
call esi
mov ebx, dword [esp + 0x20]
add esp, 8
xor esi, esi
jmp 0x40bb8c
mov esi, 0xfffffffe
test esi, esi
je 0x40bb9b
mov esi, dword [esp + 0x14]
mov ebx, 0x65
jmp 0x40bbc7
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x60]
mov edi, dword [esp + 0x10]
push 0
push eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40bfb1
cmp dword [esp + 0x60], ebx
jne 0x40bfa3
xor ebx, ebx
mov edi, dword [esp + 0x2c]
mov dword [esp + 0x18], ebx
push dword [esp + 0x20]
call fcn.004643fa
add esp, 4
push esi
call fcn.004643fa
add esp, 4
mov eax, dword [esp + 0x30]
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
add eax, edi
push 0
push 0
push eax
push dword [esp + 0x28]
call esi
mov edi, dword [esp + 0x10]
test ebx, ebx
jne 0x40bfc4
jmp 0x40bc5f
lea edx, [esp + 0x4c]
call fcn.0040b3d0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x40bfc4
push 1
push eax
push eax
mov eax, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call eax
push dword [esp + 0x48]
mov esi, eax
push dword [esp + 0x20]
push edi
call dword [sym.imp.MMFS2.dll_Ordinal_766]
mov ebx, eax
mov dword [esp + 0x18], ebx
test ebx, ebx
jne 0x40bfc4
push eax
push eax
mov eax, dword [esp + 0x50]
add eax, esi
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push eax
push dword [esp + 0x28]
call esi
lea ecx, [esp + 0xe0]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40bc70
sub ecx, edx
sar ecx, 1
cmp ecx, 4
jl 0x40be4e
lea eax, [esp + ecx*2 + 0xd8]
push str..mfx
push eax
call fcn.00465538
add esp, 8
test eax, eax
jne 0x40be4e
push eax
push eax
push eax
push edi
call esi
push 1
xorps xmm0, xmm0
lea eax, [esp + 0x54]
push eax
movlpd qword [esp + 0x28], xmm0
push dword [esp + 0x2c]
movlpd qword [esp + 0x5c], xmm0
push dword [esp + 0x2c]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x40bcde
mov esi, dword [esp + 0x50]
mov edi, dword [esp + 0x54]
jmp 0x40bcef
xorps xmm0, xmm0
movlpd qword [esp + 0x38], xmm0
mov edi, dword [esp + 0x3c]
mov esi, dword [esp + 0x38]
push 2
xorps xmm0, xmm0
lea eax, [esp + 0x3c]
push eax
movlpd qword [esp + 0x28], xmm0
push dword [esp + 0x2c]
movlpd qword [esp + 0x44], xmm0
push dword [esp + 0x2c]
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x40bd2b
mov eax, dword [esp + 0x38]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x24], eax
push 0
lea eax, [esp + 0x24]
xorps xmm0, xmm0
push eax
push edi
mov edi, dword [esp + 0x1c]
push esi
push edi
movlpd qword [esp + 0x34], xmm0
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 1
push 0x8000
xor esi, esi
call fcn.004643e4
mov ecx, eax
add esp, 8
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x2c], eax
test eax, eax
je 0x40be1c
nop
mov edi, 0x8000
cmp eax, edi
push 0
cmovb edi, eax
lea eax, [esp + 0x68]
push eax
push edi
push ecx
push dword [esp + 0x20]
mov dword [esp + 0x34], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40be0e
mov eax, dword [esp + 0x64]
cmp eax, 0xffffffff
je 0x40be14
cmp eax, edi
jne 0x40be14
mov edx, dword [esp + 0x14]
shr edi, 2
test edi, edi
je 0x40bdc4
nop dword [eax]
mov ecx, dword [edx]
mov eax, esi
shr eax, 0x1f
add edx, 4
add eax, ecx
lea esi, [eax + esi*2]
sub edi, 1
jne 0x40bdb0
mov eax, dword [esp + 0x20]
mov edi, 0
and eax, 3
mov dword [esp + 0x50], eax
jbe 0x40bdf7
mov ebx, eax
nop dword [eax + eax]
movzx ecx, byte [edi + edx]
mov eax, esi
shr eax, 0x1f
inc edi
add eax, ecx
lea esi, [eax + esi*2]
cmp edi, ebx
jb 0x40bde0
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x2c]
sub eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x2c], eax
je 0x40be18
jmp 0x40bd70
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
push 0x8000
push 0
push ecx
call fcn.00462280
push dword [esp + 0x20]
call fcn.004643fa
add esp, 0x10
mov eax, 0x65
cmp dword [esp + 0x68], esi
cmovne ebx, eax
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jne 0x40bfee
lea eax, [esp + 0xe0]
push str.FormattedText.dll
push eax
call fcn.00465538
add esp, 8
test eax, eax
jne 0x40bf87
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push ebx
mov edi, eax
lea eax, [esp + 0x2ec]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov dword [0x4a0538], eax
test eax, eax
je 0x40bf80
push str.getRunInfo
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x40bf80
push 0x3c
lea eax, [esp + 0xa8]
push ebx
push eax
call fcn.00462280
add esp, 0xc
lea eax, [esp + 0xa4]
push eax
push 0x4a0590
call esi
test eax, eax
jne 0x40bf80
mov eax, dword [esp + 0xb4]
mov dword [0x4a0788], eax
mov eax, dword [esp + 0xac]
mov dword [0x4a078c], eax
mov eax, dword [esp + 0xb0]
mov dword [0x4a0790], eax
mov eax, dword [esp + 0xb8]
mov dword [0x4a0794], eax
mov eax, dword [esp + 0xbc]
mov dword [fcn.00420330], eax
mov eax, dword [esp + 0xc0]
mov dword [fcn.00420330], eax
mov eax, dword [esp + 0xc4]
mov dword [fcn.00420180], eax
mov eax, dword [esp + 0xcc]
mov dword [0x49f0bc], eax
mov eax, dword [esp + 0xc8]
mov dword [fcn.00420330], eax
mov eax, dword [esp + 0xd0]
mov dword [0x49f02c], eax
mov eax, dword [esp + 0xd4]
mov dword [0x49edec], eax
mov eax, dword [esp + 0xd8]
mov dword [0x49ebcc], eax
mov eax, dword [esp + 0xdc]
mov dword [0x49e9ac], eax
push edi
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov esi, dword [esp + 0x34]
inc esi
mov dword [esp + 0x34], esi
cmp esi, dword [0x4a0570]
jge 0x40bfee
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x40b7d1
push edi
mov ebx, 0x40000004
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40bfee
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ebx, [eax - 0x70]
neg ebx
sbb ebx, ebx
add ebx, 0x40000004
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40bfee
mov ebx, 0x68
jmp 0x40bfee
mov ebx, 0x67
jmp 0x40bfee
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ebx, [eax - 0x26]
neg ebx
sbb ebx, ebx
add ebx, 0x40000002
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x6fc]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00460901
mov esp, ebp
pop ebp
ret
call fcn.00460a71
int3