Function at 0x401050
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x234
mov dword [ebp - 0x14], 0
mov dword [0x46a2a0], 0
mov dword [0x46a008], 0
mov dword [0x46a00c], 0
mov eax, dword [ebp + 0xc]
mov dword [0x46a014], eax
mov dword [0x46a010], 0
mov ecx, dword [ebp + 8]
movsx edx, byte [ecx]
test edx, edx
jne 0x4010b0
push 0x104
lea eax, [ebp - 0x234]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
jmp 0x4010dc
lea ecx, [ebp - 0x14]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00432e80
add esp, 8
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.0043c4c3
add esp, 8
lea ecx, [ebp - 0x14]
push ecx
call fcn.00432f00
add esp, 4
push 0x457440
lea edx, [ebp - 0x234]
push edx
call fcn.00439380
add esp, 8
mov dword [0x46a2cc], eax
cmp dword [0x46a2cc], 0
jne 0x401106
or eax, 0xffffffff
jmp 0x4013fe
cmp dword [ebp + 0xc], 0
jle 0x401121
push 0
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [0x46a2cc]
push ecx
call fcn.0043bca6
add esp, 0xc
mov edx, dword [0x46a2cc]
push edx
push 1
push 0x10
push 0x46a018
call fcn.0043b8bb
add esp, 0x10
mov eax, dword [0x46a01c]
add eax, dword [ebp + 0xc]
mov dword [0x46a2a0], eax
mov ecx, dword [0x46a020]
mov dword [0x46a2bc], ecx
mov edx, dword [0x46a2cc]
push edx
call fcn.0043b531
add esp, 4
mov eax, 1
imul ecx, eax, 0
mov byte [ebp + ecx - 0x20], 0x44
mov edx, 1
shl edx, 0
mov byte [ebp + edx - 0x20], 0x50
mov eax, 1
shl eax, 1
mov byte [ebp + eax - 0x20], 0x4d
mov ecx, 1
imul edx, ecx, 3
mov byte [ebp + edx - 0x20], 0x58
mov eax, 1
shl eax, 2
mov byte [ebp + eax - 0x20], 0
push 4
lea ecx, [ebp - 0x20]
push ecx
push 0x46a018
call fcn.0043c680
add esp, 0xc
test eax, eax
je 0x4011c0
or eax, 0xffffffff
jmp 0x4013fe
mov edx, dword [0x46a024]
mov dword [ebp - 0x28], edx
mov eax, dword [0x46a2bc]
shl eax, 5
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
lea eax, [edx + ecx + 0x10]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.0043c4b8
add esp, 4
mov dword [0x46a010], eax
cmp dword [0x46a010], 0
jne 0x401203
or eax, 0xffffffff
jmp 0x4013fe
push 0x457448
lea edx, [ebp - 0x234]
push edx
call fcn.00439380
add esp, 8
mov dword [0x46a2cc], eax
cmp dword [ebp + 0xc], 0
jle 0x401237
push 0
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [0x46a2cc]
push ecx
call fcn.0043bca6
add esp, 0xc
mov edx, dword [0x46a2cc]
push edx
push 1
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [0x46a010]
push ecx
call fcn.0043b8bb
add esp, 0x10
mov edx, dword [0x46a2cc]
push edx
call fcn.0043b531
add esp, 4
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0x14]
sar eax, 0x18
and eax, 0xff
cdq
mov ecx, 7
idiv ecx
mov dword [ebp - 0x2c], eax
cmp dword [ebp + 0x10], 0xffffffff
je 0x401332
push 0x457450
lea edx, [ebp - 0x234]
push edx
call fcn.00439380
add esp, 8
mov dword [0x46a2cc], eax
cmp dword [ebp + 0xc], 0
jle 0x4012c4
push 0
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [0x46a2cc]
push ecx
call fcn.0043bca6
add esp, 0xc
mov edx, 1
test edx, edx
je 0x4012fd
mov eax, dword [0x46a2cc]
push eax
call fcn.0043b5ed
add esp, 4
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jge 0x4012e6
jmp 0x4012fd
mov ecx, dword [ebp - 0x18]
add ecx, dword [ebp - 0x2c]
add ecx, dword [ebp - 8]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
jmp 0x4012c4
mov eax, dword [0x46a2cc]
push eax
call fcn.0043b531
add esp, 4
mov ecx, dword [ebp - 8]
and ecx, 0xffff
mov dword [ebp - 8], ecx
mov edx, dword [ebp + 0x10]
cmp edx, dword [ebp - 8]
je 0x401329
mov eax, 0xfffffffe
jmp 0x4013fe
mov eax, dword [ebp - 4]
sub eax, dword [ebp - 0x10]
mov dword [ebp - 4], eax
cmp dword [ebp + 0x14], 0xffffffff
jne 0x401351
mov dword [0x46a2c0], 0xaa
mov dword [0x46a2c4], 0x55
jmp 0x4013de
lea ecx, [ebp + 0x14]
mov dword [ebp - 0xc], ecx
mov edx, 1
imul eax, edx, 0
mov ecx, dword [ebp - 0xc]
movzx eax, byte [ecx + eax]
mov edx, 1
shl edx, 1
mov ecx, dword [ebp - 0xc]
movzx edx, byte [ecx + edx]
imul eax, edx
cdq
mov ecx, 3
idiv ecx
xor eax, dword [ebp - 4]
mov dword [0x46a2c0], eax
mov edx, 1
shl edx, 0
mov eax, dword [ebp - 0xc]
movzx eax, byte [eax + edx]
mov ecx, 1
imul edx, ecx, 3
mov ecx, dword [ebp - 0xc]
movzx edx, byte [ecx + edx]
imul eax, edx
cdq
mov ecx, 5
idiv ecx
xor eax, dword [ebp - 4]
mov dword [0x46a2c4], eax
mov edx, dword [0x46a2c0]
and edx, 0xff
mov dword [0x46a2c0], edx
mov eax, dword [0x46a2c4]
and eax, 0xff
xor eax, 0xaa
mov dword [0x46a2c4], eax
mov dword [0x46a008], 1
lea ecx, [ebp - 0x234]
push ecx
push 0x46a098
call fcn.0043c4c3
add esp, 8
xor eax, eax
mov esp, ebp
pop ebp
ret