Function at 0x4160e0
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
mov eax, 0x203c
push esi
push ebx
call fcn.005d34c0
sub esp, eax
mov esi, ecx
lea edi, [esp + 0x30]
mov dword [esp + 4], edi
mov eax, dword [ecx + 0xc]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00411950
sub esp, 8
mov dword [esp + 4], 0x71b170
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll__wfopen]
test eax, eax
je 0x4161d8
mov ebx, eax
mov dword [esp + 0xc], 2
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], eax
lea ebp, [esp + 0x21]
call fcn.005d94b0
mov dword [esp], ebx
call fcn.005d9210
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], ebx
mov dword [esp + 0x14], eax
call fcn.005d94b0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], 3
mov dword [esp], ebp
call sub.msvcrt.dll_fread
lea eax, [esp + 0x24]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], 4
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov dword [esp + 8], 3
mov dword [esp + 4], 0x71b176
mov dword [esp], ebp
call sub.msvcrt.dll_memcmp
test eax, eax
mov eax, dword [esp + 0x24]
je 0x4161e5
cmp eax, 0x204
je 0x4161ec
add esp, 0x203c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
cmp eax, 0x205
jne 0x4161d1
cmp word [0x83f1c0], 0
jne 0x4161d8
mov ebp, dword [esp + 0x14]
sub ebp, 7
mov dword [esp], ebp
call fcn.006e98b0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], ebp
mov dword [esp], eax
mov dword [esp + 0x14], eax
call sub.msvcrt.dll_fread
test byte [0x8511c0], 2
mov edx, dword [esp + 0x14]
mov dword [esp + 0x1c], 0
jne 0x4163f0
lea eax, [edx + 8]
mov ecx, dword [edx + 4]
mov ebp, dword [edx]
mov edx, dword [esi + 0x44]
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x48]
test ecx, ecx
cmove ecx, ebp
sub eax, edx
sar eax, 2
imul eax, eax, 0x3e0f83e1
cmp ecx, eax
ja 0x4164a0
jae 0x416271
imul ecx, ecx, 0x84
add ecx, edx
mov dword [esi + 0x48], ecx
mov eax, dword [esp + 0x18]
mov dword [esp + 8], ebp
mov dword [esp], edx
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 0x50]
lea edx, [eax + ebp]
mov ebp, dword [edx]
mov eax, dword [edx + 4]
add edx, 8
mov dword [esp + 0x18], edx
mov edx, dword [esi + 0x54]
test eax, eax
cmove eax, ebp
sub edx, ecx
sar edx, 4
cmp eax, edx
ja 0x416480
jae 0x4162ba
shl eax, 4
add eax, ecx
mov dword [esi + 0x54], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 8], ebp
mov dword [esp], ecx
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 0x5c]
add eax, ebp
mov ebp, dword [eax]
mov edx, dword [eax + 4]
add eax, 8
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x60]
test edx, edx
cmove edx, ebp
sub eax, ecx
sar eax, 3
imul eax, eax, 0xaaaaaaab
cmp edx, eax
ja 0x416460
jae 0x416309
lea eax, [edx + edx*2]
lea eax, [ecx + eax*8]
mov dword [esi + 0x60], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 8], ebp
mov dword [esp], ecx
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 0x68]
add eax, ebp
mov ebp, dword [eax]
mov edx, dword [eax + 4]
add eax, 8
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x6c]
test edx, edx
cmove edx, ebp
sub eax, ecx
sar eax, 2
imul eax, eax, 0xaaaaaaab
cmp edx, eax
ja 0x416443
jae 0x416358
lea eax, [edx + edx*2]
lea eax, [ecx + eax*4]
mov dword [esi + 0x6c], eax
mov eax, dword [esp + 0x18]
mov dword [esp], ecx
mov dword [esp + 8], ebp
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
add ebp, dword [esp + 0x18]
lea eax, [esi + 0x90]
mov dword [esp], eax
mov dword [esp + 4], ebp
call fcn.005f1f50
lea ecx, [esi + 0x10]
mov dword [esp], eax
call fcn.004042c0
sub esp, 4
mov eax, dword [esp + 0x14]
mov dword [esp], eax
call fcn.006e9860
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4163ac
mov dword [esp], eax
call fcn.006e9860
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
lea ecx, [esi + 0x74]
call fcn.00403630
mov dword [esp], edi
mov dword [esp + 4], 0x71b624
call sub.SHELL32.dll_StrStrIW
sub esp, 8
test eax, eax
setne al
movzx eax, al
add eax, 1
mov dword [esi + 8], eax
add esp, 0x203c
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [esp + 0x28]
mov dword [esp], edx
mov dword [esp + 4], ebp
mov dword [esp + 8], eax
call fcn.004615e0
mov ecx, dword [esp + 0x28]
mov dword [esp], ecx
mov dword [esp + 0x18], ecx
call fcn.006e98b0
mov ecx, dword [esp + 0x18]
mov edx, eax
mov eax, dword [esp + 0x14]
mov dword [esp], edx
mov dword [esp + 0xc], ebp
mov dword [esp + 0x18], edx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
call fcn.00404110
mov edx, dword [esp + 0x18]
mov dword [esp + 0x1c], edx
jmp 0x41623a
lea ecx, [esi + 0x68]
sub edx, eax
mov dword [esp], edx
call fcn.006ae520
mov ecx, dword [esi + 0x68]
sub esp, 4
jmp 0x416358
lea ecx, [esi + 0x5c]
sub edx, eax
mov dword [esp], edx
call fcn.006ae970
mov ecx, dword [esi + 0x5c]
sub esp, 4
jmp 0x416309
lea ecx, [esi + 0x50]
sub eax, edx
mov dword [esp], eax
call fcn.006af1e0
mov ecx, dword [esi + 0x50]
sub esp, 4
jmp 0x4162ba
lea edx, [esi + 0x44]
sub ecx, eax
mov dword [esp], ecx
mov ecx, edx
call fcn.006aee60
mov edx, dword [esi + 0x44]
sub esp, 4
jmp 0x416271