Function at 0x410510
Capabilities:
Check if file exists
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x429df0
mov eax, dword fs:[0]
push eax
sub esp, 0x270
mov eax, dword [0x438040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x25c], ecx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41055d
mov ecx, dword [ebp - 0x25c]
cmp dword [ecx + 0xc], 0
jne 0x410564
xor eax, eax
jmp 0x410948
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x264], eax
cmp dword [ebp - 0x264], 0xffffffff
jne 0x410596
xor eax, eax
jmp 0x410948
mov dword [ebp - 0x260], 0
mov dword [ebp - 0x258], 0
mov dword [ebp - 0x268], 1
mov dword [ebp - 0x254], 0
push 0
mov eax, dword [ebp - 0x264]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x274], eax
mov ecx, 0xa
mov esi, str.IIME_CODETABLE_READ
lea edi, [ebp - 0x218]
rep movsd dword es:[edi], dword [esi]
push 0x1e0
push 0
lea ecx, [ebp - 0x1f0]
push ecx
call fcn.0041de40
add esp, 0xc
lea edx, [ebp - 0x218]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00418b70
add esp, 8
lea ecx, [ebp - 0x218]
push ecx
mov edx, dword [ebp - 0x274]
push edx
push 0
push 2
push 0
mov eax, dword [ebp - 0x264]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x260], eax
cmp dword [ebp - 0x260], 0
jne 0x41064d
mov dword [ebp - 0x268], 0
jmp 0x4108e2
push 0
push 0
push 0
push 4
mov ecx, dword [ebp - 0x260]
push ecx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x258], eax
cmp dword [ebp - 0x258], 0
jne 0x410680
mov dword [ebp - 0x268], 0
jmp 0x4108e2
cmp dword [ebp + 0xc], 0
jne 0x41075f
mov dword [ebp - 0x270], 0x564
mov edi, dword [ebp - 0x25c]
add edi, 0x14
mov ecx, 0x159
mov esi, dword [ebp - 0x258]
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp - 0x25c]
mov eax, dword [edx + 0xd0]
sub eax, dword [ebp - 0x270]
mov dword [ebp - 0x26c], eax
push 4
push 0x3000
mov ecx, dword [ebp - 0x26c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edx, dword [ebp - 0x25c]
mov dword [edx + 0x10], eax
mov eax, dword [ebp - 0x25c]
cmp dword [eax + 0x10], 0
jne 0x4106fc
mov dword [ebp - 0x268], 0
jmp 0x4108e2
mov ecx, dword [ebp - 0x26c]
push ecx
mov edx, dword [ebp - 0x258]
add edx, dword [ebp - 0x270]
push edx
mov eax, dword [ebp - 0x25c]
mov ecx, dword [eax + 0x10]
push ecx
call fcn.0041d8c0
add esp, 0xc
mov edx, dword [ebp - 0x25c]
mov dword [edx + 0x90c], 0
mov ecx, dword [ebp - 0x25c]
call fcn.004123a0
mov ecx, dword [ebp - 0x25c]
mov dword [ecx], eax
mov edx, dword [ebp - 0x25c]
cmp dword [edx], 0
jne 0x41075f
mov dword [ebp - 0x268], 0
jmp 0x4108e2
mov eax, dword [ebp - 0x258]
mov ecx, dword [eax + 0xbc]
mov dword [ebp - 0x254], ecx
mov edx, dword [ebp - 0x254]
cmp edx, dword [ebp - 0x274]
jae 0x4108e2
lea ecx, [ebp - 0x250]
call fcn.00417300
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x258]
add eax, dword [ebp - 0x254]
movzx ecx, byte [eax]
test ecx, ecx
je 0x4107d8
mov edx, dword [ebp - 0x258]
add edx, dword [ebp - 0x254]
movzx ax, byte [edx]
movzx ecx, ax
push ecx
lea ecx, [ebp - 0x250]
call fcn.0040a990
mov edx, dword [ebp - 0x254]
add edx, 1
mov dword [ebp - 0x254], edx
jmp 0x410795
mov eax, dword [ebp - 0x254]
add eax, 1
mov dword [ebp - 0x254], eax
mov ecx, dword [ebp - 0x258]
add ecx, dword [ebp - 0x254]
push ecx
lea ecx, [ebp - 0x238]
call fcn.00401ff0
lea ecx, [ebp - 0x238]
call fcn.00401fd0
mov edx, dword [ebp - 0x254]
lea eax, [edx + eax*2 + 2]
mov dword [ebp - 0x254], eax
mov dword [ebp - 0x220], 0xfd
mov dword [ebp - 0x21c], 0
cmp dword [ebp + 0xc], 0
jne 0x41087a
mov ecx, dword [ebp - 0x258]
add ecx, dword [ebp - 0x254]
mov edx, dword [ecx]
mov dword [ebp - 0x220], edx
mov eax, dword [ebp - 0x254]
add eax, 4
mov dword [ebp - 0x254], eax
mov ecx, dword [ebp - 0x258]
add ecx, dword [ebp - 0x254]
mov edx, dword [ecx]
mov dword [ebp - 0x21c], edx
mov eax, dword [ebp - 0x254]
add eax, 4
mov dword [ebp - 0x254], eax
push 1
sub esp, 0x38
mov ecx, esp
mov dword [ebp - 0x27c], esp
lea edx, [ebp - 0x250]
push edx
call fcn.00417390
mov ecx, dword [ebp - 0x25c]
call fcn.00410970
mov dword [ebp - 0x278], eax
cmp dword [ebp - 0x278], 0
jne 0x4108cb
mov dword [ebp - 0x268], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x250]
call fcn.00417540
jmp 0x4108e2
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x250]
call fcn.00417540
jmp 0x410771
cmp dword [ebp - 0x258], 0
je 0x410902
mov eax, dword [ebp - 0x258]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 0x258], 0
cmp dword [ebp - 0x260], 0
je 0x410922
mov ecx, dword [ebp - 0x260]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x260], 0
cmp dword [ebp - 0x264], 0xffffffff
je 0x410942
mov edx, dword [ebp - 0x264]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x264], 0
mov eax, dword [ebp - 0x268]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041c52e
mov esp, ebp
pop ebp
ret 8