Function at 0x41bc20
Capabilities:
Check if file exists
Get geographical location
Read .ini file
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x5a2d11
mov eax, dword fs:[0]
push eax
sub esp, 0x280
mov eax, dword [0x5f13cc]
xor eax, esp
mov dword [esp + 0x278], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5f13cc]
xor eax, esp
push eax
lea eax, [esp + 0x294]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x2a4]
lea ebx, [esp + 0x24]
mov dword [esp + 0x40], ebp
call fcn.004747c0
mov dword [esp + 0x29c], 0
mov edx, dword [esp + 0x24]
mov eax, dword [edx - 0xc]
test eax, eax
jle 0x41bcab
lea ecx, [eax - 1]
test ecx, ecx
jl 0x41bf06
cmp ecx, eax
jg 0x41bf06
movzx eax, word [edx + ecx*2]
cmp ax, 0x5c
je 0x41bcab
push 0x5c
mov edi, ebx
call fcn.00404400
lea edi, [esp + 0x20]
call fcn.00474ab0
mov byte [esp + 0x29c], 1
mov edx, dword [esp + 0x20]
mov eax, dword [edx - 0xc]
test eax, eax
jle 0x41bceb
lea ecx, [eax - 1]
test ecx, ecx
jl 0x41bf06
cmp ecx, eax
jg 0x41bf06
movzx eax, word [edx + ecx*2]
cmp ax, 0x5c
je 0x41bceb
push 0x5c
call fcn.00404400
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov ebx, str.cities.dat
call fcn.00412480
add esp, 8
mov byte [esp + 0x29c], 2
mov edx, dword [esp + 0x18]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push edx
call esi
test eax, eax
jne 0x41bd66
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x34]
push ecx
call fcn.00412480
add esp, 8
lea edi, [esp + 0x18]
mov byte [esp + 0x29c], 3
call fcn.004035d0
mov byte [esp + 0x29c], 2
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41bd66
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x18]
push ecx
call esi
test eax, eax
je 0x41c306
mov eax, ebp
call fcn.0041cb40
mov edx, dword [esp + 0x18]
xor eax, eax
push edx
push 0x14
mov dword [esp + 0x5e], eax
mov dword [esp + 0x62], eax
mov dword [esp + 0x66], eax
mov dword [esp + 0x6a], eax
mov dword [esp + 0x6e], eax
mov dword [esp + 0x72], eax
mov dword [esp + 0x76], eax
mov dword [esp + 0x7a], eax
mov dword [esp + 0x7e], eax
mov word [esp + 0x82], ax
lea eax, [esp + 0x5c]
push eax
xor edi, edi
push edi
push str.provincecounts
push str.setting
mov word [esp + 0x6c], di
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push 0xa
lea ecx, [esp + 0x58]
push edi
push ecx
call fcn.00578c22
add esp, 0xc
push 0x208
lea edx, [esp + 0x82]
mov esi, eax
push edi
push edx
mov dword [esp + 0x5c], esi
mov word [esp + 0x88], di
call fcn.00580260
mov eax, dword [0x5fcd20]
mov edx, dword [eax + 0xc]
add esp, 0xc
mov ecx, 0x5fcd20
call edx
add eax, 0x10
mov dword [esp + 0x2c], eax
cmp esi, edi
mov byte [esp + 0x29c], 4
mov dword [esp + 0x3c], edi
jbe 0x41c2de
mov eax, dword [esp + 0x3c]
push eax
push str.province_u
lea edi, [esp + 0x34]
call fcn.004126f0
mov edx, dword [0x5fcd20]
mov eax, dword [edx + 0xc]
add esp, 8
mov ecx, 0x5fcd20
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x29c], 5
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x2c]
xor eax, eax
push ecx
push 0x14
lea edx, [esp + 0x5c]
push edx
push eax
push str.province
push esi
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [esp + 0x54]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41bec0
sub eax, edx
sar eax, 1
lea ecx, [esp + 0x54]
mov ebx, eax
push ecx
lea eax, [esp + 0x20]
call fcn.00404050
mov ebp, dword [esp + 0x1c]
cmp dword [ebp - 0xc], 0
jne 0x41bf10
lea eax, [ebp - 0x10]
mov byte [esp + 0x29c], 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x41c2bd
push 0x80070057
call fcn.00404550
mov ecx, dword [esp + 0x18]
xor eax, eax
push ecx
push 0x14
lea edx, [esp + 0x5c]
push edx
push eax
push str.citycounts
push esi
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push 0xa
lea eax, [esp + 0x58]
push 0
push eax
call fcn.00578c22
mov edx, dword [0x5fcd20]
mov edi, eax
mov eax, dword [edx + 0xc]
add esp, 0xc
mov ecx, 0x5fcd20
mov dword [esp + 0x4c], edi
call eax
add eax, 0x10
mov dword [esp + 0x38], eax
mov byte [esp + 0x29c], 6
mov edx, dword [0x5fcd20]
mov eax, dword [edx + 0xc]
mov ecx, 0x5fcd20
call eax
add eax, 0x10
mov dword [esp + 0x34], eax
xor eax, eax
test edi, edi
mov byte [esp + 0x29c], 7
mov dword [esp + 0x30], eax
jbe 0x41c255
jmp 0x41bfd4
mov esi, dword [esp + 0x2c]
push eax
push str.city_u
lea edi, [esp + 0x40]
call fcn.004126f0
push 0x20a
lea ecx, [esp + 0x88]
push 0
push ecx
call fcn.00580260
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x4c]
add esp, 0x14
push edx
push 0x105
lea eax, [esp + 0x84]
push eax
push 0
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [esp + 0x7c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41c021
sub eax, edx
sar eax, 1
lea edx, [esp + 0x7c]
mov ebx, eax
push edx
lea eax, [esp + 0x38]
call fcn.00404050
mov eax, dword [esp + 0x34]
cmp dword [eax - 0xc], 0
je 0x41c240
push 0x18
call fcn.00578e5f
add esp, 4
test eax, eax
je 0x41c240
mov esi, eax
call fcn.0041c3b0
mov esi, eax
test esi, esi
mov dword [esp + 0x44], esi
je 0x41c240
push esi
lea ecx, [esp + 0x38]
push ecx
call fcn.0041c5c0
test eax, eax
je 0x41c232
mov esi, dword [esp + 0x40]
mov eax, dword [esi + 0x28]
mov edi, dword [eax]
add esi, 0x24
mov dword [esp + 0x28], 0
lea esp, [esp]
cmp esi, esi
mov ebx, dword [esi + 4]
je 0x41c0ac
call fcn.00578ff3
cmp edi, ebx
je 0x41c124
cmp edi, dword [esi + 4]
jne 0x41c0ba
call fcn.00578ff3
mov edx, dword [edi + 8]
mov eax, dword [edx]
push ebp
push eax
call fcn.00579288
add esp, 8
test eax, eax
jne 0x41c10c
cmp edi, dword [esi + 4]
mov dword [esp + 0x28], 1
jne 0x41c0df
call fcn.00578ff3
mov esi, dword [edi + 8]
mov ebx, dword [esi + 8]
mov ecx, dword [ebx + 4]
add esi, 4
lea eax, [esp + 0x44]
push eax
push ecx
push ebx
call fcn.0041dde0
mov ecx, esi
mov ebp, eax
call fcn.005260e0
mov dword [ebx + 4], ebp
mov edx, dword [ebp + 4]
mov dword [edx], ebp
mov ebp, dword [esp + 0x1c]
mov esi, dword [esp + 0x40]
add esi, 0x24
cmp edi, dword [esi + 4]
jne 0x41c11d
call fcn.00578ff3
mov edi, dword [edi]
jmp 0x41c0a0
cmp dword [esp + 0x28], 0
jne 0x41c240
push 0x10
call fcn.00578e5f
mov edi, eax
add esp, 4
mov dword [esp + 0x48], edi
test edi, edi
mov byte [esp + 0x29c], 8
je 0x41c178
mov eax, dword [0x5fcd20]
mov edx, dword [eax + 0xc]
mov ecx, 0x5fcd20
call edx
add eax, 0x10
mov dword [edi], eax
mov byte [esp + 0x29c], 9
call fcn.0041ddc0
mov dword [edi + 8], eax
mov dword [edi + 0xc], 0
jmp 0x41c17a
xor edi, edi
test edi, edi
mov byte [esp + 0x29c], 7
mov dword [esp + 0x48], edi
je 0x41c240
mov ebx, dword [edi]
lea eax, [ebp - 0x10]
sub ebx, 0x10
cmp eax, ebx
je 0x41c1e3
cmp dword [ebx + 0xc], 0
lea ebp, [ebx + 0xc]
jl 0x41c1d4
mov ecx, dword [eax]
cmp ecx, dword [ebx]
jne 0x41c1d4
call fcn.00403ce0
mov dword [esp + 0x28], eax
or edx, 0xffffffff
lock xadd dword [ebp], edx
dec edx
test edx, edx
jg 0x41c1c9
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov eax, dword [esp + 0x28]
add eax, 0x10
mov dword [edi], eax
jmp 0x41c1e3
mov eax, dword [esp + 0x1c]
mov ebx, dword [eax - 0xc]
push eax
mov eax, edi
call fcn.00404050
lea ebp, [edi + 4]
mov edi, dword [ebp + 4]
mov edx, dword [edi + 4]
lea ecx, [esp + 0x44]
push ecx
push edx
push edi
call fcn.0041dde0
mov ecx, ebp
mov ebx, eax
call fcn.005260e0
mov dword [edi + 4], ebx
mov eax, dword [ebx + 4]
mov dword [eax], ebx
mov edi, dword [esi + 4]
mov ecx, dword [edi + 4]
lea eax, [esp + 0x48]
push eax
push ecx
push edi
call fcn.0041dde0
mov ecx, esi
mov ebx, eax
call fcn.005260e0
mov ebp, dword [esp + 0x1c]
mov dword [edi + 4], ebx
mov eax, dword [ebx + 4]
mov dword [eax], ebx
jmp 0x41c240
call fcn.0041c420
push esi
call fcn.00578327
add esp, 4
mov eax, dword [esp + 0x30]
add eax, 1
cmp eax, dword [esp + 0x4c]
mov dword [esp + 0x30], eax
jb 0x41bfd0
mov byte [esp + 0x29c], 6
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41c27d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x29c], 5
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41c2a5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x10]
mov byte [esp + 0x29c], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41c2c9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x3c]
add eax, 1
cmp eax, dword [esp + 0x50]
mov dword [esp + 0x3c], eax
jb 0x41be2c
mov byte [esp + 0x29c], 2
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41c306
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x29c], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41c32e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x29c], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41c356
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x29c], 0xffffffff
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41c381
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x294]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x278]
xor ecx, esp
call fcn.005787fd
add esp, 0x28c
ret 4