Function at 0x40b010
Capabilities:
Get common file path
Read .ini file
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2e4
mov eax, dword [0x41e038]
xor eax, esp
mov dword [esp + 0x2e0], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
push edi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], eax
mov ecx, 0x401ae0
xor ebx, ebx
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40b067
cmp dx, bx
je 0x40b063
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40b067
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x40b041
xor eax, eax
jmp 0x40b06c
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x40b40d
call fcn.004117c0
test eax, eax
jne 0x40b0ec
mov word [esp + 0x70], ax
push 0x35
mov eax, 0x401af8
lea esi, [esp + 0x74]
mov dword [esp + 0x88], 7
mov dword [esp + 0x84], ebx
call fcn.004088c0
mov eax, dword [esp + 0x70]
mov esi, 8
cmp dword [esp + 0x84], esi
jae 0x40b0ba
lea eax, [esp + 0x70]
push 0x40010
push 0x401968
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp dword [esp + 0x84], esi
jb 0x40b9e1
mov ecx, dword [esp + 0x70]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
jmp 0x40b9e1
push 0x401b64
push ebx
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov dword [0x41e52c], eax
cmp eax, ebx
jne 0x40b174
xor edx, edx
push 0x37
mov eax, 0x401ba8
lea esi, [esp + 0x74]
mov dword [esp + 0x88], 7
mov dword [esp + 0x84], ebx
mov word [esp + 0x74], dx
call fcn.004088c0
mov eax, dword [esp + 0x70]
mov esi, 8
cmp dword [esp + 0x84], esi
jae 0x40b142
lea eax, [esp + 0x70]
push 0x40010
push 0x401968
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp dword [esp + 0x84], esi
jb 0x40b9e1
mov eax, dword [esp + 0x70]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
jmp 0x40b9e1
push 0x800
push ebx
push ebx
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [0x41e528], eax
cmp eax, ebx
jne 0x40b1d5
mov ecx, dword [0x41e52c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x401c18
lea ecx, [esp + 0x70]
call fcn.00408290
cmp dword [esp + 0x84], 8
mov eax, dword [esp + 0x70]
jae 0x40b1ba
lea eax, [esp + 0x70]
push 0x40010
push 0x401968
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
lea esi, [esp + 0x70]
jmp 0x40b9dc
mov eax, 0x401c88
lea ecx, [esp + 0xc4]
call fcn.00408290
mov eax, dword [0x41e528]
lea ecx, [esp + 0x8c]
call fcn.00408290
lea edx, [esp + 0xc4]
push edx
lea ecx, [esp + 0x90]
lea edx, [esp + 0x74]
call fcn.00410cc0
add esp, 4
lea esi, [esp + 0x8c]
call fcn.00412770
lea esi, [esp + 0xc4]
call fcn.00412770
mov eax, dword [0x41e528]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [0x41e52c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x70]
push ebx
push esi
or eax, 0xffffffff
mov ecx, 0x41e5cc
call fcn.00408480
mov eax, dword [0x41e5cc]
mov edi, 8
cmp dword [0x41e5e0], edi
jae 0x40b26d
mov eax, 0x41e5cc
push ebx
push eax
call dword [sym.imp.MSVCR100.dll__waccess]
add esp, 8
cmp eax, 0xffffffff
jne 0x40b2d1
mov eax, 0x401c90
lea ecx, [esp + 0x8c]
call fcn.00408290
mov eax, dword [esp + 0x8c]
cmp dword [esp + 0xa0], edi
jae 0x40b2a5
lea eax, [esp + 0x8c]
push 0x40010
push 0x401968
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
lea esi, [esp + 0x8c]
call fcn.00412770
lea ebx, [esp + 0x70]
call fcn.00411960
jmp 0x40b9e1
mov ebx, 1
lea eax, [esi + 0x1c]
mov dword [0x41e568], ebx
cmp dword [eax + 0x14], edi
jb 0x40b2e6
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCR100.dll__wtoi]
add esp, 4
push 0
lea edx, [esi + 0x38]
mov dword [0x41e570], eax
push edx
or eax, 0xffffffff
mov ecx, 0x41e63c
call fcn.00408480
push 0
lea eax, [esi + 0x54]
push eax
or eax, 0xffffffff
mov ecx, 0x41e5e8
call fcn.00408480
push 0
lea ecx, [esi + 0x70]
push ecx
or eax, 0xffffffff
mov ecx, 0x41e658
call fcn.00408480
push 0
lea edx, [esi + 0x8c]
push edx
or eax, 0xffffffff
mov ecx, 0x41e674
call fcn.00408480
push 0
lea eax, [esi + 0xa8]
push eax
or eax, 0xffffffff
mov ecx, 0x41e6c8
call fcn.00408480
mov ecx, dword [esi + 0xd4]
lea eax, [esi + 0xc4]
mov edi, ebx
call fcn.00412670
test eax, eax
jne 0x40b377
mov byte [0x41e576], bl
mov ecx, 0x41e568
call fcn.0040ebb0
test al, al
jne 0x40b3ed
mov eax, 0x401dc0
lea ecx, [esp + 0x8c]
call fcn.00408290
cmp dword [esp + 0xa0], 8
mov eax, dword [esp + 0x8c]
jae 0x40b3ae
lea eax, [esp + 0x8c]
push 0x40010
push 0x401968
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
lea esi, [esp + 0x8c]
call fcn.00412770
lea ebx, [esp + 0x70]
call fcn.00411960
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2e0]
xor ecx, esp
call fcn.0041b4f6
mov esp, ebp
pop ebp
ret
lea ebx, [esp + 0x70]
call fcn.00411960
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2e0]
xor ecx, esp
call fcn.0041b4f6
mov esp, ebp
pop ebp
ret
lea edi, [esp + 0x14]
mov eax, 0x401e18
call fcn.00407fe0
test al, al
je 0x40b44d
push 0x401968
push 0x40156c
call dword [sym.imp.USER32.dll_FindWindowW]
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2e0]
xor ecx, esp
call fcn.0041b4f6
mov esp, ebp
pop ebp
ret
push 0x40135c
call dword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
push 0x104
lea ecx, [esp + 0xe4]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0xe0]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40b476
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0xe4]
mov esi, 0x41e1a8
call fcn.004088c0
lea edx, [esp + 0xe0]
push 0x5c
push edx
call dword [sym.imp.MSVCR100.dll_wcsrchr]
add esp, 8
test eax, eax
je 0x40b4b4
xor ecx, ecx
mov word [eax + 2], cx
xor edx, edx
mov ebx, 7
lea eax, [esp + 0xe0]
mov word [esp + 0xa8], dx
mov dword [esp + 0xbc], ebx
mov dword [esp + 0xb8], 0
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40b4e0
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0xe4]
lea esi, [esp + 0xac]
call fcn.004088c0
push 0xd
mov eax, 0x401524
mov ecx, esi
call fcn.00408790
cmp dword [esp + 0xbc], 8
mov eax, dword [esp + 0xa8]
jae 0x40b524
mov eax, esi
mov edi, dword [sym.imp.MSVCR100.dll__waccess]
push 0
push eax
call edi
add esp, 8
test eax, eax
je 0x40b5db
xor eax, eax
mov word [esp + 0x70], ax
push 0x1b
mov eax, 0x401e54
lea esi, [esp + 0x74]
mov dword [esp + 0x88], ebx
mov dword [esp + 0x84], 0
call fcn.004088c0
mov eax, dword [esp + 0x70]
mov edi, 8
cmp dword [esp + 0x84], edi
jae 0x40b577
mov eax, esi
push 0x40010
push 0x401968
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov esi, dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
cmp dword [esp + 0x84], edi
jb 0x40b5a3
mov ecx, dword [esp + 0x70]
push ecx
call esi
add esp, 4
xor edx, edx
mov dword [esp + 0x84], ebx
mov dword [esp + 0x80], 0
mov word [esp + 0x70], dx
cmp dword [esp + 0xbc], edi
jb 0x40b9e1
mov eax, dword [esp + 0xa8]
push eax
call esi
add esp, 4
jmp 0x40b9e1
lea eax, [esp + 0xe0]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40b5e5
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0xe4]
mov esi, 0x41e63c
call fcn.004088c0
mov ecx, dword [esp + 0xb8]
push 3
add ecx, 0xfffffffd
push ecx
lea eax, [esp + 0xb0]
call fcn.00411c50
mov eax, dword [esp + 0xa8]
mov ebx, 8
cmp dword [esp + 0xbc], ebx
jae 0x40b63b
lea eax, [esp + 0xa8]
push 0
push eax
call edi
add esp, 8
test eax, eax
lea eax, [esp + 0xe0]
jne 0x40b6f2
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40b655
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0xe4]
mov esi, 0x41e604
call fcn.004088c0
mov eax, dword [esp + 0xa8]
cmp dword [esp + 0xbc], ebx
jae 0x40b68d
lea eax, [esp + 0xa8]
push eax
push 0x1000
lea edx, [esp + 0xe8]
push edx
push 0x40135c
push 0x40137c
push 0x401390
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test eax, eax
je 0x40b6ca
push 0x41e620
lea eax, [esp + 0xe4]
call fcn.004082d0
jmp 0x40b80e
push 0
push 0x41e63c
or eax, 0xffffffff
mov ecx, 0x41e620
call fcn.00408480
push 0x41e620
mov eax, 0x4013a4
call fcn.00408300
jmp 0x40b80e
push eax
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov ebx, eax
lea eax, [esp + 0xe0]
add eax, 0xfffffffe
lea ecx, [ecx]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x40b710
mov ecx, dword [0x4013b4]
mov edx, dword [0x4013b8]
mov dword [eax], ecx
mov ecx, dword [0x4013bc]
mov dword [eax + 4], edx
mov edx, dword [0x4013c0]
mov dword [eax + 8], ecx
mov ecx, dword [0x4013c4]
mov dword [eax + 0xc], edx
mov edx, dword [0x4013c8]
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], edx
lea eax, [esp + 0xe0]
lea edx, [eax + 2]
jmp 0x40b760
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40b760
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0xe4]
mov esi, 0x41e604
call fcn.004088c0
lea edi, [esp + 0xe0]
add edi, 0xfffffffe
jmp 0x40b790
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x40b790
mov ecx, 7
mov esi, 0x401360
rep movsd dword es:[edi], dword [esi]
test ebx, ebx
js 0x40b98d
lea eax, [esp + 0xe0]
push 0
push eax
call dword [sym.imp.MSVCR100.dll__waccess]
add esp, 8
test eax, eax
jne 0x40b98d
lea ecx, [esp + 0xe0]
push ecx
push 0x1000
mov edx, ecx
push edx
push 0x40135c
push 0x40137c
push 0x401390
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test eax, eax
je 0x40b986
push 0x41e620
lea eax, [esp + 0xe4]
call fcn.004082d0
mov ebx, 8
mov esi, dword [esp + 0xc]
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40b817
sub eax, edx
sar eax, 1
push eax
mov eax, esi
mov esi, 0x41e5cc
call fcn.004088c0
cmp dword [0x41e5dc], 0
jne 0x40b8e3
push 0x54
lea eax, [esp + 0x20]
push 0
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
lea eax, [esp + 0x18]
lea ecx, [esp + 0xe0]
xor edx, edx
push eax
mov dword [esp + 0x1c], 0x58
mov dword [esp + 0x28], 0x401e90
mov dword [esp + 0x34], 1
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], 0x104
mov dword [esp + 0x4c], 0x401eec
mov dword [esp + 0x58], 0x401f24
mov dword [esp + 0x50], 0x1000
mov word [esp + 0xe4], dx
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
test eax, eax
jne 0x40b8d0
lea esi, [esp + 0xa8]
call fcn.00412770
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2e0]
xor ecx, esp
call fcn.0041b4f6
mov esp, ebp
pop ebp
ret
push 0x41e5cc
lea eax, [esp + 0xe4]
call fcn.004082d0
jmp 0x40b91a
mov eax, dword [0x41e5cc]
cmp dword [0x41e5e0], ebx
jae 0x40b8f5
mov eax, 0x41e5cc
cmp word [eax], 0x22
jne 0x40b91a
mov eax, 1
xor ecx, ecx
mov esi, 0x41e5cc
call fcn.004089b0
mov ecx, dword [0x41e5dc]
dec ecx
mov eax, esi
call fcn.004083e0
call fcn.0040c900
test al, al
je 0x40b95e
mov ecx, dword [esp + 0x10]
push 0
push 0x40ba00
push 0
push 0x66
push ecx
call dword [sym.imp.USER32.dll_DialogBoxParamW]
lea esi, [esp + 0xa8]
mov edi, eax
call fcn.00412770
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2e0]
xor ecx, esp
call fcn.0041b4f6
mov esp, ebp
pop ebp
ret
lea esi, [esp + 0xa8]
mov edi, 1
call fcn.00412770
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2e0]
xor ecx, esp
call fcn.0041b4f6
mov esp, ebp
pop ebp
ret
mov eax, 0x4013d0
jmp 0x40b992
mov eax, 0x401488
lea ecx, [esp + 0x8c]
call fcn.00408290
cmp dword [esp + 0xa0], 8
mov eax, dword [esp + 0x8c]
jae 0x40b9b6
lea eax, [esp + 0x8c]
push 0x40010
push 0x401968
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
lea esi, [esp + 0x8c]
call fcn.00412770
lea esi, [esp + 0xa8]
call fcn.00412770
mov ecx, dword [esp + 0x2ec]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.0041b4f6
mov esp, ebp
pop ebp
ret