Function at 0x165edc0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa4
mov eax, dword [0x1854370]
xor eax, esp
mov dword [esp + 0xa0], eax
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov dword [esp + 0x28], edi
cmp dword [edi + 0x28], ebx
je 0x165f3f9
xor eax, eax
mov dword [esp + 0x90], eax
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], eax
mov eax, dword [edi + 0x18]
mov dword [esp + 0x8c], ebx
cmp eax, ebx
je 0x165eecf
test byte [eax + 8], 0x20
je 0x165eecf
mov eax, dword [edi + 0x28]
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], ebx
mov edx, dword [eax]
mov edx, dword [edx + 0x1c]
push ecx
push eax
call edx
mov esi, dword [esp + 0x20]
cmp esi, ebx
je 0x165eecf
push esi
lea ecx, [esp + 0xa0]
call fcn.0164e3e0
mov ecx, dword [eax]
mov dword [esp + 0x8c], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x90], edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x94], ecx
mov edx, dword [eax + 0xc]
mov eax, dword [edi + 0x28]
mov dword [esp + 0x98], edx
mov ecx, dword [eax]
mov edx, dword [ecx + 0x30]
push esi
push eax
call edx
lea eax, [esp + 0x8c]
push eax
lea ecx, [esp + 0x18]
push ecx
mov ecx, 0x1853f00
call fcn.0165c650
push eax
lea ecx, [edi + 0x10]
call fcn.0165ad70
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x165eec3
add eax, 0x34
or edx, 0xffffffff
lock xadd dword [eax], edx
jne 0x165eec3
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x18]
call fcn.01655a80
mov ecx, dword [edi + 0x10]
cmp dword [ecx + 0x3c], ebx
jne 0x165f3f9
mov dword [esp + 0x70], ebx
mov dword [esp + 0x24], 0x184c158
mov edx, 0x184c160
mov eax, 1
lock xadd dword [edx], eax
mov eax, dword [edi + 0x28]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
push eax
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x70], ebx
call edx
xor esi, esi
mov dword [esp + 0x88], eax
mov dword [esp + 0x20], esi
cmp eax, ebx
jbe 0x165f3ad
mov eax, dword [edi + 0x28]
mov ecx, dword [eax]
lea edx, [esp + 0x7c]
push edx
push esi
push eax
mov eax, dword [ecx + 0x14]
call eax
cmp dword [esp + 0x7c], ebx
jne 0x165f39b
mov eax, dword [edi + 0x28]
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x1c], ebx
mov ecx, dword [eax]
push esi
push eax
mov eax, dword [ecx + 0x10]
call eax
cmp dword [esp + 0x18], ebx
je 0x165f39b
mov dword [esp + 0x1c], 0x184c178
mov ecx, 0x184c178
mov edx, 1
lock xadd dword [ecx], edx
mov eax, dword [edi + 0x28]
mov ecx, dword [eax]
push ebx
push ebx
push ebx
lea edx, [esp + 0x50]
push edx
push esi
push eax
mov eax, dword [ecx + 0x24]
call eax
test eax, eax
jne 0x165efec
mov edx, dword [esp + 0x44]
lea ecx, [esp + 0x54]
push ecx
push 0xffffffffffffffff
push edx
lea eax, [esp + 0x84]
push eax
call fcn.01276260
add esp, 0xc
mov ecx, eax
call fcn.01274d20
mov edx, dword [eax]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x1c], edx
mov dword [eax], ecx
mov eax, dword [esp + 0x54]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x165efc2
mov edx, dword [esp + 0x54]
push edx
call fcn.01285a10
add esp, 4
mov eax, dword [esp + 0x78]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x165efdc
mov edx, dword [esp + 0x78]
push edx
call fcn.01273020
add esp, 4
mov eax, dword [esp + 0x44]
push eax
call dword [fcn.016d5388]
jmp 0x165f088
mov eax, dword [esp + 0x6c]
inc eax
push 0xa
push eax
lea ecx, [esp + 0x7c]
push ecx
mov dword [esp + 0x78], eax
call fcn.01290490
add esp, 0xc
push 0x17ff928
lea ecx, [esp + 0x50]
mov esi, eax
call fcn.0128e840
push esi
mov ecx, eax
call fcn.0128ebe0
mov eax, dword [eax]
mov dword [esp + 0x30], eax
mov edx, 1
lock xadd dword [eax], edx
mov eax, dword [esp + 0x4c]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x165f046
mov edx, dword [esp + 0x4c]
push edx
call fcn.01285a10
add esp, 4
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x20]
call fcn.01273030
mov ecx, dword [esp + 0x30]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x165f06e
mov eax, dword [esp + 0x30]
push eax
call fcn.01285a10
add esp, 4
mov ecx, dword [esp + 0x74]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x165f088
mov eax, dword [esp + 0x74]
push eax
call fcn.01285a10
add esp, 4
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x2c]
mov dword [esp + 0x2c], ebx
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0xc]
call eax
mov eax, dword [esp + 0x2c]
cmp eax, ebx
je 0x165f364
xor ecx, ecx
xor edx, edx
mov dword [esp + 0x60], ecx
cmp dx, word [eax + 0x2e]
jae 0x165f364
jmp 0x165f0c0
mov eax, dword [esp + 0x18]
lea esi, [esp + 0x14]
push esi
mov dword [esp + 0x18], ebx
mov edx, dword [eax]
push ecx
push eax
mov eax, dword [edx + 0x18]
call eax
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x165f33e
cmp dword [eax + 0x20], 2
jne 0x165f33e
mov ecx, dword [eax + 8]
mov edi, dword [ecx + 8]
mov eax, dword [eax]
mov dword [esp + 0x10], 0x184c178
mov edx, 0x184c178
mov ecx, 1
lock xadd dword [edx], ecx
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx]
lea esi, [esp + 0x84]
push esi
push 1
lea esi, [esp + 0x64]
push esi
push eax
mov eax, dword [edx + 0x1c]
push ecx
call eax
cmp dword [esp + 0x84], ebx
je 0x165f19c
mov edx, dword [esp + 0x5c]
lea ecx, [esp + 0x38]
push ecx
push 0xffffffffffffffff
push edx
lea eax, [esp + 0x74]
push eax
call fcn.01276260
add esp, 0xc
mov ecx, eax
call fcn.01274d20
mov edx, dword [eax]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x10], edx
mov dword [eax], ecx
mov eax, dword [esp + 0x38]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x165f175
mov edx, dword [esp + 0x38]
push edx
call fcn.01285a10
add esp, 4
mov eax, dword [esp + 0x68]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x165f18f
mov edx, dword [esp + 0x68]
push edx
call fcn.01273020
add esp, 4
mov eax, dword [esp + 0x5c]
push eax
call dword [fcn.016d5388]
jmp 0x165f203
mov esi, dword [esp + 0x70]
push 0xa
lea ecx, [esp + 0x40]
push esi
push ecx
call fcn.01290490
push eax
lea edx, [esp + 0x74]
push 0x183129c
push edx
call fcn.01267b21
add esp, 0x18
push eax
lea ecx, [esp + 0x14]
call fcn.01273030
mov eax, dword [esp + 0x64]
inc esi
mov dword [esp + 0x70], esi
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x165f1e9
mov edx, dword [esp + 0x64]
push edx
call fcn.01285a10
add esp, 4
mov eax, dword [esp + 0x3c]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x165f203
mov edx, dword [esp + 0x3c]
push edx
call fcn.01285a10
add esp, 4
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 0xc]
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x48]
push ecx
call fcn.01274dc0
add esp, 0xc
push eax
lea ecx, [esp + 0x28]
call fcn.01648f30
mov edx, dword [esp + 0x40]
mov bl, al
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x165f240
mov ecx, dword [esp + 0x40]
push ecx
call fcn.01273020
add esp, 4
test bl, bl
je 0x165f281
mov eax, dword [esp + 0x48]
inc eax
push 0xa
push eax
lea edx, [esp + 0x58]
push edx
mov dword [esp + 0x54], eax
call fcn.01290490
add esp, 0xc
push eax
lea ecx, [esp + 0x14]
call fcn.0128ebe0
mov eax, dword [esp + 0x50]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x165f281
mov edx, dword [esp + 0x50]
push edx
call fcn.01285a10
add esp, 4
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 0xc]
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x60]
push ecx
call fcn.01274dc0
add esp, 0xc
lea edx, [esp + 0x37]
push edx
push eax
lea eax, [esp + 0x88]
push eax
lea ecx, [esp + 0x30]
call 0x128b1f0
mov ecx, dword [esp + 0x58]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x165f2c9
mov eax, dword [esp + 0x58]
push eax
call fcn.01273020
add esp, 4
mov esi, dword [esp + 0x10]
mov dword [esp + 0x9c], esi
mov ecx, esi
mov edx, 1
lock xadd dword [ecx], edx
lea eax, [esp + 0x9c]
push eax
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x30]
add ecx, 0x10
mov dword [esp + 0xa8], edi
call fcn.0165adc0
mov ecx, eax
call fcn.016550d0
mov edx, esi
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x165f31a
push esi
call fcn.01285a10
add esp, 4
mov ecx, dword [esp + 0x10]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x165f334
mov eax, dword [esp + 0x10]
push eax
call fcn.01285a10
add esp, 4
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x14]
xor ebx, ebx
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x54]
push ecx
call eax
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x60]
movzx edx, word [eax + 0x2e]
inc ecx
mov dword [esp + 0x60], ecx
cmp ecx, edx
jb 0x165f0c0
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x4c]
push ecx
call eax
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x1c]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x165f397
mov edx, dword [esp + 0x1c]
push edx
call fcn.01285a10
add esp, 4
mov esi, dword [esp + 0x20]
inc esi
mov dword [esp + 0x20], esi
cmp esi, dword [esp + 0x88]
jb 0x165ef11
lea ecx, [esp + 0x8c]
call fcn.0169b0b0
test al, al
jne 0x165f3db
add edi, 0x10
push edi
lea eax, [esp + 0x90]
push eax
lea ecx, [esp + 0x88]
push ecx
mov ecx, 0x1853f00
call fcn.0165ec60
mov eax, dword [esp + 0x24]
add eax, 8
or edx, 0xffffffff
lock xadd dword [eax], edx
jne 0x165f3f9
mov ecx, dword [esp + 0x24]
push 0x12c5480
call fcn.0128b360
mov ecx, dword [esp + 0xac]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.016664c7
mov esp, ebp
pop ebp
ret