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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x628
mov eax, dword [0x102519c8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x208
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x628], ecx
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x20c]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x1021aa54
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
call fcn.10003180
mov esi, dword [eax + 0x154]
test esi, esi
je 0x1016389e
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x1f
call fcn.10003680
add esp, 4
test eax, eax
je 0x101638b7
lea ecx, [ebp - 0x20c]
push ecx
call eax
jmp 0x101638c4
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov edi, eax
test esi, esi
je 0x101638d1
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
or ebx, 0xffffffff
test edi, edi
jne 0x101639db
push 0x208
lea eax, [ebp - 0x20c]
push edi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x624]
push str.config_antiadwa_exts.ini
push eax
call fcn.101b0cc0
add esp, 4
push eax
lea eax, [ebp - 0x620]
push eax
call fcn.10007f40
add esp, 0xc
lea ecx, [ebp - 0x20c]
mov edx, 0x104
mov esi, dword [eax]
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x10163944
movzx eax, word [esi]
test ax, ax
je 0x10163944
mov word [ecx], ax
add esi, 2
add ecx, 2
sub edx, 1
jne 0x10163922
jmp 0x10163948
test edx, edx
jne 0x1016394b
sub ecx, 2
mov edx, dword [ebp - 0x620]
xor eax, eax
mov word [ecx], ax
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1016396d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x624]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1016398a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.10003180
mov esi, dword [eax + 0x154]
test esi, esi
je 0x101639a0
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x1f
call fcn.10003680
add esp, 4
test eax, eax
je 0x101639b9
lea ecx, [ebp - 0x20c]
push ecx
call eax
jmp 0x101639c6
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov edi, eax
test esi, esi
je 0x101639d3
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
je 0x10163cf6
call fcn.10002d70
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0xc]
push dword [ebp + 8]
add eax, 0x10
mov dword [ebp - 0x620], eax
lea eax, [ebp - 0x620]
push 0x10204700
push eax
call fcn.10002cb0
push 0x410
lea eax, [ebp - 0x61c]
push 0
push eax
call sub.msvcrt.dll_memset
mov esi, dword [ebp - 0x620]
lea eax, [ebp - 0x20c]
add esp, 0x18
push eax
push 0x208
lea eax, [ebp - 0x61c]
push eax
push 0x10202940
push str.exts
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test eax, eax
je 0x10163b38
call fcn.10002d70
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0xc]
add eax, 0x10
lea ecx, [ebp - 0x620]
push 0x10202c44
mov dword [ebp - 0x620], eax
call fcn.10023e80
test al, al
jne 0x10163a87
push 1
push 0x10202c44
lea ecx, [ebp - 0x620]
call fcn.10003740
call fcn.10002d70
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0xc]
add eax, 0x10
lea ecx, [ebp - 0x624]
mov dword [ebp - 0x624], eax
lea eax, [ebp - 0x61c]
push eax
call fcn.10023e80
test al, al
jne 0x10163ae2
lea ecx, [ebp - 0x61c]
lea edx, [ecx + 2]
jmp 0x10163ac0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10163ac0
sub ecx, edx
lea eax, [ebp - 0x61c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x624]
call fcn.10003740
push dword [ebp - 0x628]
lea eax, [ebp - 0x620]
push eax
lea eax, [ebp - 0x624]
push eax
call fcn.101b1a50
mov edx, dword [ebp - 0x624]
add esp, 0xc
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10163b1b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x620]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10163b38
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
lea edi, [ebp - 0x61c]
mov ecx, 0x104
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x20c]
push eax
push 0x208
lea eax, [ebp - 0x61c]
push eax
push 0x10202940
push str.creater
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test eax, eax
je 0x10163c5e
call fcn.10002d70
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0xc]
add eax, 0x10
lea ecx, [ebp - 0x624]
push 0x10202c44
mov dword [ebp - 0x624], eax
call fcn.10023e80
test al, al
jne 0x10163bae
push 1
push 0x10202c44
lea ecx, [ebp - 0x624]
call fcn.10003740
call fcn.10002d70
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0xc]
add eax, 0x10
lea ecx, [ebp - 0x620]
mov dword [ebp - 0x620], eax
lea eax, [ebp - 0x61c]
push eax
call fcn.10023e80
test al, al
jne 0x10163c04
lea ecx, [ebp - 0x61c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10163be2
sub ecx, edx
lea eax, [ebp - 0x61c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x620]
call fcn.10003740
mov eax, dword [ebp - 0x628]
add eax, 0xc
push eax
lea eax, [ebp - 0x624]
push eax
lea eax, [ebp - 0x620]
push eax
call fcn.101b1a50
mov edx, dword [ebp - 0x620]
add esp, 0xc
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10163c41
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x624]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10163c5e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
lea edi, [ebp - 0x61c]
mov ecx, 0x104
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x20c]
push eax
push 0x208
lea eax, [ebp - 0x61c]
push eax
push 0x10202940
push str.factory_name
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test eax, eax
je 0x10163cc3
mov ecx, dword [ebp - 0x628]
lea edx, [ebp - 0x61c]
lea edi, [edx + 2]
lea ecx, [ecx + 0x18]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x10163ca7
sub edx, edi
lea eax, [ebp - 0x61c]
sar edx, 1
push edx
push eax
call fcn.10003740
lea eax, [ebp - 0x20c]
push eax
push 0
push str.group_type
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov ecx, dword [ebp - 0x628]
add esi, 0xfffffff0
mov dword [ecx + 0x1c], eax
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x10163cf6
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.101f99c6
mov esp, ebp
pop ebp
ret 4