Function at 0x40b740
Capabilities:
Check if file exists
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f8941
mov eax, dword fs:[0]
push eax
sub esp, 0x268
mov eax, dword [0x530010]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x258], esi
push 0x208
lea eax, [ebp - 0x218]
mov dword [ebp - 0x258], esi
push 0
push eax
call fcn.004c6550
mov ecx, dword [0x530b60]
mov eax, bind
sub eax, ecx
add esp, 0xc
cmp eax, 0xb
jb 0x40bbc4
cmp dword [0x530b64], 8
mov eax, 0x530b50
push 0xb
cmovae eax, dword [0x530b50]
push 0x518994
push ecx
push eax
push ecx
push dword [ebp - 0x258]
lea ecx, [ebp - 0x254]
call fcn.004065c0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x254]
cmp dword [ebp - 0x240], 8
cmovae eax, dword [ebp - 0x254]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40b90b
cmp dword [ebp - 0x240], 8
lea eax, [ebp - 0x254]
cmovae eax, dword [ebp - 0x254]
push eax
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0x5189ac
push 0x5189dc
push str.setting
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b840
sub ecx, edx
sar ecx, 1
jne 0x40b86a
push 0x5189ac
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.004d3860
add esp, 0xc
xor eax, eax
mov dword [esi], 0
lea ecx, [ebp - 0x218]
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
lea edx, [ecx + 2]
mov word [esi], ax
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b890
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.004014e0
mov edx, dword [ebp - 0x240]
cmp edx, 8
jb 0x40b8ee
mov ecx, dword [ebp - 0x254]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40b8e4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40bbbf
push edx
push ecx
call fcn.00476a87
add esp, 8
mov eax, esi
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.00476a44
mov esp, ebp
pop ebp
ret
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov edx, eax
mov dword [ebp - 0x23c], 0
mov ecx, edx
mov dword [ebp - 0x22c], 0
xor eax, eax
mov dword [ebp - 0x228], 7
mov word [ebp - 0x23c], ax
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b967
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x23c]
call fcn.004014e0
xorps xmm0, xmm0
mov dword [ebp - 0x21c], 0
movq qword [ebp - 0x224], xmm0
mov dword [ebp - 0x224], 0
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x270]
push 1
xor eax, eax
mov dword [ebp - 0x270], 0
push 0x5180fc
mov dword [ebp - 0x260], 0
mov dword [ebp - 0x25c], 7
mov word [ebp - 0x270], ax
call fcn.004014e0
lea eax, [ebp - 0x270]
mov byte [ebp - 4], 3
push eax
lea edx, [ebp - 0x224]
lea ecx, [ebp - 0x23c]
call fcn.0040add0
mov byte [ebp - 4], 2
add esp, 4
mov edx, dword [ebp - 0x25c]
cmp edx, 8
jb 0x40ba56
mov ecx, dword [ebp - 0x270]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ba4c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40bbbf
push edx
push ecx
call fcn.00476a87
add esp, 8
mov ecx, dword [ebp - 0x220]
mov eax, 0x2aaaaaab
mov edi, dword [ebp - 0x224]
sub ecx, edi
imul ecx
mov ecx, esi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 1
jbe 0x40baf8
lea eax, [eax + eax*2]
lea eax, [eax - 3]
lea eax, [edi + eax*8]
push eax
call fcn.00406340
lea ecx, [ebp - 0x224]
call fcn.004063d0
mov edx, dword [ebp - 0x228]
cmp edx, 8
jb 0x40bad6
mov ecx, dword [ebp - 0x23c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40bacc
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40bbbf
push edx
push ecx
call fcn.00476a87
add esp, 8
xor eax, eax
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x228], 7
mov word [ebp - 0x23c], ax
jmp 0x40b8ae
push 3
xor eax, eax
mov dword [esi], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
push 0x5189ac
mov word [esi], ax
call fcn.004014e0
lea ecx, [ebp - 0x224]
call fcn.004063d0
mov edx, dword [ebp - 0x228]
cmp edx, 8
jb 0x40bb64
mov ecx, dword [ebp - 0x23c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40bb5a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40bbbf
push edx
push ecx
call fcn.00476a87
add esp, 8
mov edx, dword [ebp - 0x240]
xor eax, eax
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x228], 7
mov word [ebp - 0x23c], ax
cmp edx, 8
jb 0x40b8ee
mov ecx, dword [ebp - 0x254]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40b8e4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40b8e4
call fcn.004ca66d
call fcn.00401410
int3