Function at 0x401850
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40ed10
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x41314c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, dword [ebp + 8]
mov dword [ebp - 4], 0
cmp dword [edi], 0
sete al
test al, al
sete al
test al, al
jne 0x401b06
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
call fcn.00401f20
add edi, 4
call fcn.00401fc0
push 0x208
call fcn.004023ff
add esp, 4
mov esi, eax
push 0x104
push esi
push 0
mov dword [ebp - 0x24], esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x20]
push eax
mov ecx, esi
call fcn.00401d60
lea ecx, [ebp - 0x1c]
push ecx
mov ebx, eax
mov byte [ebp - 4], 1
call fcn.00401e30
add esp, 4
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x401914
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x208
call fcn.004023ff
add esp, 4
push 0x208
mov ebx, eax
call fcn.004023ff
mov ecx, dword [ebp - 0x1c]
add esp, 4
push ecx
push 0x104
mov edi, eax
push edi
push str.db.dat
push str.APP_DATABASE_FILE
push str.APP_SECTION
mov dword [ebp - 0x28], edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ecx, esi
mov edx, ebx
jmp 0x401960
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x401960
mov eax, edi
mov edx, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401975
mov edi, ebx
sub eax, edx
add edi, 0xfffffffe
jmp 0x401990
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x401990
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea edx, [ebp - 0x18]
rep movsb byte es:[edi], byte [esi]
push edx
mov edi, ebx
call fcn.00401290
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x14]
push ecx
mov byte [ebp - 4], 4
call fcn.00401450
add esp, 8
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0x24]
push edx
call fcn.00402b67
add esp, 4
push ebx
call fcn.00402b67
mov eax, dword [ebp - 0x28]
add esp, 4
push eax
call fcn.00402b67
add esp, 4
push 0
push ecx
mov ebx, esp
mov dword [ebp - 0x28], esp
push 0x410d4e
call fcn.00401200
push ecx
mov byte [ebp - 4], 6
mov ebx, esp
mov dword [ebp - 0x24], esp
push 0x410d4e
call fcn.00401200
push ecx
mov ecx, dword [ebp - 0x14]
mov eax, esp
mov dword [eax], ecx
mov eax, dword [ebp - 0x14]
xor ebx, ebx
mov dword [ebp - 0x2c], esp
cmp eax, ebx
je 0x401a34
add eax, 8
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov edx, dword [ebp + 8]
mov byte [ebp - 4], 8
mov ecx, dword [edx]
cmp ecx, ebx
jne 0x401a4b
push 0x80004003
call fcn.0040b630
mov byte [ebp - 4], 5
call fcn.00401660
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x401a9c
mov esi, eax
add eax, 8
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
cmp eax, ebx
jne 0x401a99
cmp esi, ebx
je 0x401a99
mov eax, dword [esi]
cmp eax, ebx
je 0x401a80
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x401a90
push eax
call fcn.00402b67
add esp, 4
push esi
call fcn.004025ba
add esp, 4
mov dword [ebp - 0x14], ebx
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x18]
cmp eax, ebx
je 0x401ae4
mov esi, eax
add eax, 8
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
cmp eax, ebx
jne 0x401ae1
cmp esi, ebx
je 0x401ae1
mov eax, dword [esi]
cmp eax, ebx
je 0x401ac8
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x401ad8
push eax
call fcn.00402b67
add esp, 4
push esi
call fcn.004025ba
add esp, 4
mov dword [ebp - 0x18], ebx
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401b06
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4