Function at 0x406183
Capabilities:
Get file size
Read file via mapping

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push edi
mov edi, eax
xor esi, esi
cmp edi, esi
je 0x4063ca
cmp word [edi], si
je 0x4063ca
push ebx
push 0x8001
mov dword [ebp - 8], esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push esi
push 0x8000080
push 3
push esi
push 1
push SysReAllocStringLen
push edi
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0xc], edi
cmp edi, 0xffffffff
je 0x406221
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, esi
jne 0x4061fa
mov esi, dword [ebp + 8]
xor eax, eax
call fcn.004063da
xor edi, edi
inc edi
xor esi, esi
jmp 0x4063a2
push esi
push esi
push esi
push 2
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 8], eax
cmp eax, esi
je 0x406221
push esi
push esi
push esi
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 4], eax
cmp eax, esi
jne 0x40623e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jg 0x406232
mov edi, eax
jmp 0x406394
and eax, 0xffff
or eax, 0x80070000
jmp 0x40622b
cmp ebx, 1
jbe 0x4062c1
movzx ecx, word [eax]
mov edx, 0xfeff
cmp cx, dx
jne 0x40627c
mov esi, dword [ebp + 8]
and ebx, 0xfffffffe
mov eax, ebx
call fcn.004063da
mov edi, eax
test edi, edi
jl 0x406389
mov esi, dword [esi]
lea eax, [ebx - 2]
push eax
mov eax, dword [ebp - 4]
add eax, 2
push eax
push esi
call fcn.0040f220
jmp 0x4062b0
mov edx, 0xfffe
cmp cx, dx
jne 0x4062c1
mov esi, dword [ebp + 8]
and ebx, 0xfffffffe
mov eax, ebx
call fcn.004063da
mov edi, eax
test edi, edi
jl 0x406389
mov esi, dword [esi]
lea eax, [ebx - 2]
push eax
mov eax, dword [ebp - 4]
add eax, 2
push esi
push eax
call fcn.0040bb90
shr ebx, 1
add esp, 0xc
xor eax, eax
mov word [esi + ebx*2 - 2], ax
jmp 0x406387
push 3
pop ecx
cmp ebx, ecx
jb 0x40631d
mov edi, 0x4026b8
mov esi, eax
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x4062da
sbb edx, edx
sbb edx, 0xffffffff
test edx, edx
jne 0x40631b
mov esi, dword [ebp + 8]
sub ebx, 3
lea eax, [ebx + ebx + 2]
call fcn.004063da
mov edi, eax
test edi, edi
jl 0x406389
mov edi, dword [esi]
test ebx, ebx
je 0x40630e
mov ecx, dword [ebp - 4]
push edi
push ebx
add ecx, 3
mov edx, ebx
call fcn.00406000
jmp 0x406311
mov eax, dword [ebp - 0x10]
add eax, eax
xor ecx, ecx
mov word [eax + edi], cx
jmp 0x40637f
xor esi, esi
mov edx, eax
lea ecx, [ebx - 1]
mov eax, 0xfa
cmp ecx, eax
jae 0x40632d
mov eax, ecx
cmp eax, esi
je 0x40634c
movzx ecx, byte [edx]
inc edx
cmp ecx, 0x20
jae 0x406349
xor edi, edi
inc edi
mov esi, edi
shl esi, cl
test esi, 0x8003780
je 0x4063be
dec eax
jne 0x406331
mov esi, dword [ebp + 8]
lea eax, [ebx + ebx + 2]
call fcn.004063da
mov edi, eax
test edi, edi
jl 0x406389
lea eax, [ebx + 1]
push eax
mov edi, esi
mov esi, dword [edi]
push esi
push ebx
push dword [ebp - 4]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
add eax, eax
xor ecx, ecx
mov word [eax + esi], cx
mov esi, edi
add eax, 2
call fcn.004063da
xor edi, edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
xor esi, esi
cmp dword [ebp - 8], esi
je 0x4063a2
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
cmp dword [ebp - 0xc], esi
je 0x4063b1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov eax, edi
jmp 0x4063cf
mov esi, dword [ebp + 8]
xor eax, eax
call fcn.004063da
jmp 0x406389
mov eax, 0x80070057
pop edi
pop esi
leave
ret 4