Function at 0x80180b5
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x1058]
mov eax, 0x1058
call fcn.081713b0
push 0xffffffffffffffff
push 0x8175a1a
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x8230fb8]
xor eax, ebp
mov dword [ebp + 0x1054], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x1060]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 0x1064]
mov esi, ecx
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x1068]
xor ebx, ebx
mov dword [ebp - 0x30], eax
mov dword [esi + 0x368], ebx
mov dword [esi + 0x36c], ebx
cmp dword [esi + 0x5b0], 0xfffffffe
mov dword [ebp - 0x28], ebx
jne 0x80183f4
mov eax, dword [esi + 0x5c4]
cmp eax, ebx
mov dword [ebp - 0x14], 1
je 0x80183df
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp + 0x250]
push ecx
push ebx
push ebx
lea ecx, [ebp - 0x3c]
push ecx
lea ecx, [ebp + 0xf94]
push ecx
push dword [esi + 0x5b8]
mov dword [ebp - 0x3c], 0x40
push eax
mov dword [ebp - 0x24], 0x61e
call dword [0x8230fcc]
test eax, eax
jne 0x80183c9
mov eax, 0x30e
cmp dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
ja 0x8018193
lea eax, [ebp - 0x24]
mov eax, dword [eax]
mov word [ebp + eax*2 + 0x254], bx
push 0x30d
lea eax, [ebp + 0x254]
push eax
lea eax, [ebp + 0xf94]
push eax
xor edi, edi
call fcn.08085d1d
add esp, 0xc
test al, al
je 0x8018218
xor eax, eax
lea eax, [ebp + eax*2 + 0xf94]
cmp word [eax], 0x20
jne 0x80181d2
mov word [eax], 0x2d
inc edi
movzx eax, di
cmp eax, dword [ebp - 0x3c]
jb 0x80181c0
push ebx
push ebx
push 0x40
lea eax, [ebp + 0x1014]
push eax
push 0xffffffffffffffff
lea eax, [ebp + 0xf94]
push eax
push 0x400
push ebx
call dword [0x8231034]
test eax, eax
je 0x801820c
lea eax, [ebp + 0x1014]
push eax
call fcn.0808928e
pop ecx
mov dword [ebp - 0x28], 1
jmp 0x80183ba
cmp word [ebp + 0x256], 0x3a
je 0x801831c
cmp word [ebp + 0x256], 0x5c
je 0x801831c
lea eax, [ebp + 0x44]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0x38], 0x105
call fcn.0812ea09
test al, al
pop ecx
pop ecx
je 0x80183bd
mov edi, 0x30d
lea eax, [ebp + 0x254]
push edi
push eax
call dword [sym.imp.MSVCR80.dll_wcsnlen]
cmp eax, edi
pop ecx
pop ecx
mov dword [ebp - 0x20], eax
jae 0x80183bd
dec edi
sub edi, eax
lea eax, [ebp + eax*2 + 0x256]
push edi
push eax
mov dword [ebp - 0x34], eax
call dword [sym.imp.MSVCR80.dll_wcsnlen]
cmp eax, edi
pop ecx
pop ecx
jae 0x80183bd
mov ecx, dword [ebp - 0x38]
lea eax, [eax + ecx*2 + 4]
add eax, dword [ebp - 0x20]
cmp eax, 0x30f
ja 0x80183bd
push dword [ebp - 0x1c]
lea eax, [ebp + 0x974]
push eax
call dword [sym.imp.MSVCR80.dll_wcscpy]
mov edi, dword [sym.imp.MSVCR80.dll_wcscat]
lea eax, [ebp + 0x974]
push 0x819ddb8
push eax
call edi
lea eax, [ebp + 0x254]
push eax
lea eax, [ebp + 0x974]
push eax
call edi
lea eax, [ebp + 0x974]
push 0x819ddb4
push eax
call edi
push dword [ebp - 0x1c]
lea eax, [ebp + 0x974]
push eax
call edi
lea eax, [ebp + 0x974]
push 0x819ddb8
push eax
call edi
push dword [ebp - 0x34]
lea eax, [ebp + 0x974]
push eax
call edi
add esp, 0x38
jmp 0x80183ba
xor eax, eax
lea edi, [ebp - 0x54]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
lea edi, [ebp - 0x60]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp + 0x254]
push eax
mov eax, 0x30d
call fcn.08085c9d
add esp, 0xc
test al, al
je 0x8018385
mov eax, dword [ebp - 0x50]
cmp word [eax], bx
je 0x8018385
mov edi, dword [ebp - 0x5c]
add edi, edi
lea ecx, [edi + 2]
push ecx
push eax
lea eax, [ebp + 0x974]
push eax
call sub.MSVCR80.dll_memcpy
mov eax, dword [ebp - 0x60]
lea eax, [eax + eax + 2]
push eax
push dword [ebp - 0x54]
lea eax, [ebp + edi + 0x976]
push eax
call sub.MSVCR80.dll_memcpy
add esp, 0x18
jmp 0x80183a2
mov eax, dword [ebp - 0x24]
add eax, 0xfffffffc
push eax
lea eax, [ebp + 0x254]
push eax
lea eax, [ebp + 0x974]
push eax
call sub.MSVCR80.dll_memcpy
add esp, 0xc
lea eax, [ebp + 0x974]
push eax
call dword [sym.imp.MSVCR80.dll_wcslen]
pop ecx
mov word [ebp + eax*2 + 0x974], 0x2c
mov dword [ebp - 0x14], ebx
lea eax, [ebp + 0xf94]
mov dword [esi + 0x5b4], eax
inc dword [esi + 0x5b8]
cmp dword [ebp - 0x14], ebx
jne 0x80183df
cmp dword [ebp - 0x28], ebx
je 0x8018467
jmp 0x80183e5
inc dword [esi + 0x5b0]
mov dword [esi + 0x5b4], 0x819ddb0
jmp 0x8018120
mov eax, dword [esi + 0x5b4]
jmp 0x8018422
inc dword [esi + 0x5b0]
mov eax, dword [esi + 0x5b0]
cmp eax, 2
jge 0x801893b
mov eax, dword [esi + eax*8 + 0x5a4]
cmp eax, ebx
mov dword [esi + 0x5b4], eax
je 0x80183fc
cmp word [eax], bx
je 0x80183fc
cmp dword [0x823abc8], 1
jne 0x8018464
push 0x819dda0
push 0x30f
lea eax, [ebp + 0x974]
push eax
mov eax, dword [esi + 0x5b0]
push 0x819ddb0
push dword [esi + 0x5b4]
push dword [esi + eax*8 + 0x5a0]
call dword [0x823101c]
mov dword [ebp - 0x24], eax
jmp 0x8018467
mov dword [ebp - 0x24], ebx
cmp dword [ebp - 0x24], ebx
je 0x801893f
cmp word [ebp + 0x974], bx
je 0x801893f
lea eax, [ebp + 0x974]
push 0x819ddb4
push eax
call dword [sym.imp.MSVCR80.dll_wcsstr]
mov edi, eax
cmp edi, ebx
pop ecx
pop ecx
je 0x801893f
mov eax, dword [esi + 0x5b4]
inc edi
push 0x819dd70
inc edi
push eax
mov dword [ebp - 0x34], edi
call dword [sym.imp.MSVCR80.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
je 0x801864e
push edi
call dword [sym.imp.MSVCR80.dll_wcslen]
cmp eax, 4
pop ecx
jbe 0x801864e
lea eax, [edi + eax*2 - 8]
cmp word [eax], 0x2e
jne 0x801864e
movzx ecx, word [eax + 2]
cmp cx, 0x70
je 0x80184ef
cmp cx, 0x50
jne 0x801864e
movzx ecx, word [eax + 4]
cmp cx, 0x73
je 0x8018503
cmp cx, 0x53
jne 0x801864e
movzx eax, word [eax + 6]
cmp ax, 0x73
je 0x8018517
cmp ax, 0x53
jne 0x801864e
push ebx
push 0x8000080
push 3
push ebx
push 1
push 0x80000000
push edi
call dword [0x8231000]
cmp eax, 0xffffffff
mov dword [ebp - 0x1c], eax
je 0x8018645
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
je 0x8018639
cmp edi, 6
jbe 0x8018639
sub edi, 6
lea eax, [edi + 1]
push eax
call fcn.0804164c
cmp eax, ebx
pop ecx
mov dword [ebp - 0x14], eax
je 0x8018639
lea eax, [edi + 1]
push eax
push ebx
push dword [ebp - 0x14]
call sub.MSVCR80.dll_memset
add esp, 0xc
push ebx
push ebx
push 6
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x8018630
push ebx
lea eax, [ebp - 0x48]
push eax
push edi
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x8018630
mov edi, dword [ebp - 0x14]
push 0x819dd9c
push edi
call dword [sym.imp.MSVCR80.dll_strstr]
cmp eax, ebx
pop ecx
pop ecx
je 0x8018630
lea edx, [eax - 1]
cmp edx, edi
jbe 0x801861c
mov cl, byte [edx]
cmp cl, 0x20
je 0x80185f4
cmp cl, 9
je 0x80185f4
cmp cl, 0xa
je 0x80185f4
cmp cl, 0xd
je 0x80185f4
cmp cl, 0x5d
je 0x80185f4
cmp cl, 0x7d
je 0x80185f4
cmp cl, 0x2f
je 0x80185f4
dec edx
cmp edx, edi
ja 0x80185ca
cmp edx, edi
jbe 0x801861c
inc edx
jmp 0x801861c
mov cl, byte [eax]
cmp cl, 0x20
je 0x8018620
cmp cl, 9
je 0x8018620
cmp cl, 0xa
je 0x8018620
cmp cl, 0xd
je 0x8018620
cmp cl, 0x5b
je 0x8018620
cmp cl, 0x7b
je 0x8018620
inc eax
cmp byte [eax], bl
jne 0x80185fb
push edx
mov byte [eax], bl
call fcn.0808928e
pop ecx
mov dword [ebp - 0x28], 1
push dword [ebp - 0x14]
call fcn.080416a2
pop ecx
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x34]
cmp dword [ebp - 0x28], ebx
jne 0x801893f
mov ecx, dword [esi + 0x5c0]
cmp ecx, ebx
je 0x8018674
push edi
call fcn.08017d93
test eax, eax
jne 0x801893f
mov ecx, dword [esi + 0x5c0]
push 1
push edi
call fcn.08017ea1
push edi
call dword [sym.imp.MSVCR80.dll_wcslen]
inc eax
cmp eax, 0x104
pop ecx
ja 0x801893f
push edi
push dword [ebp - 0x40]
mov dword [ebp - 4], ebx
call dword [sym.imp.MSVCR80.dll_wcscpy]
lea eax, [ebp + 0x974]
push eax
mov word [edi - 2], bx
call dword [sym.imp.MSVCR80.dll_wcslen]
add esp, 0xc
inc eax
push eax
lea eax, [ebp + 0x974]
push eax
lea ecx, [ebp - 0x4c]
call fcn.08014d5b
mov ecx, dword [ebp - 0x2c]
push eax
mov byte [ebp - 4], 1
call fcn.08018082
cmp dword [ebp - 0x4c], ebx
mov byte [ebp - 4], bl
je 0x80186d9
push dword [ebp - 0x4c]
call dword [0x823135c]
pop ecx
or dword [ebp - 4], 0xffffffff
push 0x819ddb4
push dword [esi + 0x5b4]
call dword [sym.imp.MSVCR80.dll_wcsstr]
push dword [esi + 0x5b4]
call dword [sym.imp.MSVCR80.dll_wcslen]
add esp, 0xc
cmp dword [esi + 0x5b0], 0xfffffffe
mov dword [ebp - 0x2c], eax
jne 0x801885f
mov dword [ebp - 0x20], ebx
mov edi, 0x819dd98
jmp 0x801871c
mov word [eax], 0x2d
mov eax, dword [esi + 0x5b4]
push edi
push eax
call dword [sym.imp.MSVCR80.dll_wcsstr]
cmp eax, ebx
pop ecx
pop ecx
jne 0x8018717
cmp dword [0x823abc8], 2
jne 0x801874f
lea eax, [ebp]
push eax
push dword [esi + 0x5b4]
call fcn.08086db2
pop ecx
pop ecx
mov byte [ebp - 0x15], al
jmp 0x80187ba
push ebx
push ebx
push 0x104
lea eax, [ebp + 0x870]
push eax
push 0xffffffffffffffff
push dword [esi + 0x5b4]
push 0x400
push ebx
call dword [0x8231034]
test eax, eax
je 0x80187ba
lea eax, [ebp + 0x1030]
push eax
lea eax, [ebp + 0x870]
push eax
call fcn.08086d91
cmp al, bl
pop ecx
pop ecx
mov byte [ebp - 0x15], al
je 0x8018809
mov ax, word [ebp + 0x1050]
push 0x20
mov word [ebp + 0x40], ax
lea eax, [ebp]
push eax
push 0x20
lea eax, [ebp + 0x1030]
push eax
push ebx
push ebx
call dword [0x8231030]
test eax, eax
jne 0x80187ba
mov byte [ebp - 0x15], bl
cmp byte [ebp - 0x15], bl
je 0x8018809
mov eax, dword [ebp - 0x30]
mov edi, dword [eax]
push 0x5c
push ebx
push edi
mov dword [ebp - 0x20], 1
call sub.MSVCR80.dll_memset
mov al, byte [ebp + 0x40]
and al, 2
neg al
push 0x40
sbb eax, eax
and eax, 0x12c
add eax, 0x190
mov dword [edi + 0x10], eax
mov al, byte [ebp + 0x40]
and al, 1
mov byte [edi + 0x14], al
lea eax, [ebp]
push eax
add edi, 0x1c
push edi
call sub.MSVCR80.dll_memcpy
add esp, 0x18
mov edi, 0x819dd98
cmp dword [ebp - 0x20], ebx
jne 0x8018901
mov eax, dword [esi + 0x5b4]
push edi
push eax
call dword [sym.imp.MSVCR80.dll_wcsstr]
cmp eax, ebx
pop ecx
pop ecx
je 0x8018829
mov word [eax], bx
mov edi, dword [ebp - 0x30]
mov ecx, dword [edi]
mov eax, dword [esi + 0x5b4]
mov dword [ebp - 0x40], ecx
lea ecx, [ebp - 0x44]
push ecx
push 0x8085bbb
push eax
push dword [esi + 0x5c8]
mov dword [ebp - 0x44], eax
call dword [0x8230fe4]
test eax, eax
je 0x8018901
mov dword [edi], ebx
jmp 0x8018901
mov eax, dword [ebp - 0x30]
mov edi, dword [eax]
mov eax, dword [esi + 0x5b4]
push 0x819ddb4
push eax
call dword [sym.imp.MSVCR80.dll_wcsstr]
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0x14], eax
je 0x8018882
mov word [eax], bx
push 0x5c
push ebx
push edi
call sub.MSVCR80.dll_memset
push 0x40
push dword [esi + 0x5b4]
lea eax, [edi + 0x1c]
push eax
call sub.MSVCR80.dll_memcpy
add esp, 0x18
cmp dword [ebp - 0x14], ebx
mov dword [edi + 0x10], 0x190
je 0x8018901
add dword [ebp - 0x14], 2
mov ebx, dword [sym.imp.MSVCR80.dll__wcsnicmp]
push 0xa
push 0x819dd80
push dword [ebp - 0x14]
call ebx
add esp, 0xc
test eax, eax
jne 0x80188ce
mov byte [edi + 0x14], 1
jmp 0x80188fa
push 6
push 0x819dc80
push dword [ebp - 0x14]
call ebx
add esp, 0xc
test eax, eax
jne 0x80188e7
mov byte [edi + 0x14], 1
jmp 0x8018901
push 4
push 0x819dd74
push dword [ebp - 0x14]
call ebx
add esp, 0xc
test eax, eax
jne 0x8018901
mov dword [edi + 0x10], 0x2bc
mov eax, dword [ebp - 0x2c]
lea eax, [eax + eax + 2]
add dword [esi + 0x5b4], eax
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1054]
xor ecx, ebp
call fcn.08047f9e
add ebp, 0x1058
leave
ret 0xc
xor al, al
jmp 0x8018910
lea edi, [esi + 0x5b4]
push dword [edi]
call dword [sym.imp.MSVCR80.dll_wcslen]
lea eax, [eax + eax + 2]
add dword [edi], eax
pop ecx
jmp 0x8018120