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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4457d2
mov eax, dword fs:[0]
push eax
sub esp, 0x68
push ebx
push esi
push edi
mov eax, dword [0x459668]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
add edi, 0xc
mov dword [esp + 0x1c], 0
call fcn.00408e60
mov ebx, edi
call fcn.00408de0
mov eax, dword [edi]
sub eax, 0x10
push eax
call fcn.00406b40
add eax, 0x10
add esp, 4
mov dword [esp + 0x2c], eax
lea ecx, [esp + 0x48]
mov dword [esp + 0x80], 0
call fcn.00419474
mov byte [esp + 0x80], 1
mov eax, dword [edi]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jl 0x40821c
push 0x44dfa0
push eax
call fcn.0042eff8
add esp, 8
test eax, eax
je 0x40821c
sub eax, dword [edi]
sar eax, 1
cmp eax, 0xffffffff
je 0x40821c
mov ebx, dword [0x4472ec]
mov esi, 0x45d880
mov eax, dword [esi]
push eax
call ebx
cmp eax, 5
jne 0x40819b
mov eax, dword [esp + 0x50]
push esi
push eax
lea ecx, [esp + 0x50]
call fcn.0041985a
add esi, 4
cmp esi, 0x45d8e0
jl 0x408182
mov eax, dword [edi]
cmp dword [eax - 0xc], 0
jl 0x408216
push 0x44dfa0
push eax
call fcn.0042eff8
add esp, 8
test eax, eax
je 0x408216
sub eax, dword [edi]
sar eax, 1
mov ecx, eax
test ecx, ecx
jle 0x408216
mov edx, dword [edi]
mov eax, dword [edx - 0xc]
sub eax, ecx
push eax
lea eax, [esp + 0x2c]
push eax
mov ecx, edi
call fcn.00408f00
push eax
mov ecx, edi
mov byte [esp + 0x84], 2
call fcn.00406ac0
mov byte [esp + 0x80], 1
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408216
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push edi
call fcn.00408bc0
call fcn.00419091
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x408236
push 0x80004005
call fcn.00402a70
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x5c]
mov byte [esp + 0x80], 3
call fcn.0041b9e3
mov byte [esp + 0x80], 4
mov eax, dword [edi]
mov ecx, dword [eax - 0xc]
cmp ecx, 1
jl 0x408288
add eax, 2
push 0x44dfb0
push eax
call fcn.0042eff8
add esp, 8
test eax, eax
je 0x408288
sub eax, dword [edi]
sar eax, 1
mov dword [esp + 0x18], eax
jmp 0x408290
mov dword [esp + 0x18], 0xffffffff
mov ecx, dword [esp + 0x18]
push ecx
lea edx, [esp + 0x34]
push edx
mov ecx, edi
mov dword [esp + 0x2c], 0
call fcn.00408f80
mov byte [esp + 0x80], 5
mov eax, dword [eax]
mov edx, dword [esp + 0x14]
add edx, 0xfffffff0
lea ebx, [eax - 0x10]
cmp ebx, edx
mov dword [esp + 0x28], edx
je 0x408371
cmp dword [edx + 0xc], 0
jl 0x408363
mov ecx, dword [ebx]
cmp ecx, dword [edx]
jne 0x408363
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
call edx
cmp dword [ebx + 0xc], 0
lea ecx, [ebx + 0xc]
jl 0x4082fe
cmp eax, dword [ebx]
jne 0x4082fe
mov esi, ebx
mov eax, 1
lock xadd dword [ecx], eax
jmp 0x408339
mov ecx, dword [ebx + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov esi, eax
test esi, esi
je 0x408941
mov eax, dword [ebx + 4]
mov dword [esi + 4], eax
mov eax, dword [ebx + 4]
lea ecx, [eax + eax + 2]
push ecx
add ebx, 0x10
lea edx, [eax + eax + 2]
push ebx
push edx
lea eax, [esi + 0x10]
push eax
call fcn.0042e9f7
add esp, 0x10
mov eax, dword [esp + 0x28]
add eax, 0xc
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40835a
mov eax, dword [esp + 0x28]
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 0x10
mov dword [esp + 0x14], esi
jmp 0x408371
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.00406920
mov byte [esp + 0x80], 4
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408399
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x50]
lea ecx, [eax - 1]
cmp ecx, 0xffffffff
jne 0x4083dc
mov eax, dword [edi]
push 0
push eax
lea ecx, [esp + 0x64]
call fcn.0041ba71
test eax, eax
jne 0x408855
mov ecx, dword [esp + 0x14]
push eax
push ecx
lea ecx, [esp + 0x64]
call fcn.0041ba71
test eax, eax
je 0x4087b8
mov eax, 1
jmp 0x408859
xor esi, esi
test ecx, ecx
mov dword [esp + 0x20], esi
jl 0x4087af
test esi, esi
jl 0x408928
cmp esi, eax
jge 0x408928
mov edx, dword [esp + 0x4c]
lea eax, [edx + esi*4]
push edi
push eax
lea eax, [esp + 0x40]
push eax
call fcn.00409000
add esp, 0xc
mov byte [esp + 0x80], 7
mov ebx, dword [esp + 0x1c]
mov eax, dword [eax]
push 0
or ebx, 1
push eax
lea ecx, [esp + 0x64]
mov dword [esp + 0x24], ebx
call fcn.0041ba71
test eax, eax
jne 0x40848b
cmp esi, dword [esp + 0x50]
jge 0x408928
mov ecx, dword [esp + 0x4c]
lea edx, [esp + 0x14]
lea eax, [ecx + esi*4]
push edx
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.00409000
add esp, 0xc
mov dword [esp + 0x80], 8
mov eax, dword [eax]
push 0
or ebx, 2
push eax
lea ecx, [esp + 0x64]
mov dword [esp + 0x24], ebx
call fcn.0041ba71
test eax, eax
je 0x408484
add dword [esp + 0x24], 1
jne 0x40848b
mov byte [esp + 0x13], 0
jmp 0x408490
mov byte [esp + 0x13], 1
test bl, 2
mov dword [esp + 0x80], 7
je 0x4084c7
mov eax, dword [esp + 0x34]
and ebx, 0xfffffffd
add eax, 0xfffffff0
mov dword [esp + 0x1c], ebx
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4084c7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, 1
mov dword [esp + 0x80], 4
je 0x4084fe
mov eax, dword [esp + 0x38]
and ebx, 0xfffffffe
add eax, 0xfffffff0
mov dword [esp + 0x1c], ebx
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4084fe
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [esp + 0x13], 0
jne 0x408520
mov eax, dword [esp + 0x50]
add esi, 1
lea ecx, [eax - 1]
cmp esi, ecx
mov dword [esp + 0x20], esi
jle 0x4083ea
jmp 0x4087af
cmp esi, dword [esp + 0x50]
mov edx, dword [ebp + 8]
mov dword [edx + 4], 1
jge 0x408928
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x20]
lea eax, [eax + ecx*4]
push edi
push eax
lea edx, [esp + 0x44]
push edx
call fcn.00409000
add esp, 0xc
mov byte [esp + 0x80], 9
mov eax, dword [eax]
mov esi, dword [edi]
lea ebx, [eax - 0x10]
sub esi, 0x10
cmp ebx, esi
je 0x408610
cmp dword [esi + 0xc], 0
jl 0x408604
mov ecx, dword [ebx]
cmp ecx, dword [esi]
jne 0x408604
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
call edx
cmp dword [ebx + 0xc], 0
lea ecx, [ebx + 0xc]
jl 0x40859f
cmp eax, dword [ebx]
jne 0x40859f
mov dword [esp + 0x28], ebx
mov eax, 1
lock xadd dword [ecx], eax
jmp 0x4085e0
mov ecx, dword [ebx + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
test eax, eax
mov dword [esp + 0x28], eax
je 0x408941
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x28]
mov dword [ecx + 4], eax
mov eax, dword [ebx + 4]
lea edx, [eax + eax + 2]
push edx
add ebx, 0x10
push ebx
lea eax, [eax + eax + 2]
push eax
add ecx, 0x10
push ecx
call fcn.0042e9f7
add esp, 0x10
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4085f9
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [esp + 0x28]
add ecx, 0x10
mov dword [edi], ecx
jmp 0x408610
mov ecx, dword [eax - 0xc]
push ecx
push eax
mov ecx, edi
call fcn.00406920
mov byte [esp + 0x80], 4
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x408638
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x24], 0
je 0x4087af
mov ecx, dword [edi]
mov eax, dword [ecx - 0xc]
sub eax, dword [esp + 0x18]
lea edx, [esp + 0x40]
sub eax, 1
push eax
push edx
mov ecx, edi
call fcn.00408f00
mov byte [esp + 0x80], 0xa
mov eax, dword [eax]
push eax
mov eax, dword [ebp + 8]
add eax, 0x10
push eax
call fcn.00407b60
mov byte [esp + 0x80], 4
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40869b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x20]
cmp ecx, dword [esp + 0x50]
jge 0x408928
mov edx, dword [esp + 0x4c]
mov eax, ecx
lea ecx, [esp + 0x14]
lea eax, [edx + eax*4]
push ecx
push eax
lea edx, [esp + 0x4c]
push edx
call fcn.00409000
add esp, 0xc
mov byte [esp + 0x80], 0xb
mov eax, dword [eax]
mov esi, dword [edi]
lea ebx, [eax - 0x10]
sub esi, 0x10
cmp ebx, esi
je 0x408787
cmp dword [esi + 0xc], 0
jl 0x40877b
mov ecx, dword [ebx]
cmp ecx, dword [esi]
jne 0x40877b
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
call edx
cmp dword [ebx + 0xc], 0
lea ecx, [ebx + 0xc]
jl 0x408716
cmp eax, dword [ebx]
jne 0x408716
mov dword [esp + 0x28], ebx
mov eax, 1
lock xadd dword [ecx], eax
jmp 0x408757
mov ecx, dword [ebx + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
test eax, eax
mov dword [esp + 0x28], eax
je 0x408941
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x28]
mov dword [ecx + 4], eax
mov eax, dword [ebx + 4]
lea edx, [eax + eax + 2]
push edx
add ebx, 0x10
push ebx
lea eax, [eax + eax + 2]
push eax
add ecx, 0x10
push ecx
call fcn.0042e9f7
add esp, 0x10
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x408770
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [esp + 0x28]
add ecx, 0x10
mov dword [edi], ecx
jmp 0x408787
mov ecx, dword [eax - 0xc]
push ecx
push eax
mov ecx, edi
call fcn.00406920
mov byte [esp + 0x80], 4
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4087af
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp + 8]
cmp dword [ecx + 4], 0
jne 0x4087f0
mov eax, dword [esp + 0x18]
add eax, 1
mov ecx, dword [edi]
mov edx, dword [ecx - 0xc]
js 0x4087f0
cmp eax, edx
jg 0x4087f0
lea edx, [ecx + eax*2]
push 0x44dfb0
push edx
call fcn.0042eff8
add esp, 8
test eax, eax
je 0x4087f0
sub eax, dword [edi]
sar eax, 1
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
jne 0x408290
mov ecx, dword [ebp + 8]
cmp dword [ecx + 4], 0
jne 0x408a22
mov edx, dword [esp + 0x2c]
mov eax, dword [edi]
sub eax, 0x10
lea ebx, [edx - 0x10]
cmp ebx, eax
mov dword [esp + 0x28], eax
je 0x40899d
cmp dword [eax + 0xc], 0
jl 0x408991
mov ecx, dword [ebx]
cmp ecx, dword [eax]
jne 0x408991
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
cmp dword [ebx + 0xc], 0
lea ecx, [ebx + 0xc]
jl 0x40892d
cmp eax, dword [ebx]
jne 0x40892d
mov esi, ebx
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x408969
mov eax, dword [esp + 0x24]
test eax, eax
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], 1
je 0x4087f0
mov edx, dword [edi]
mov eax, dword [edx - 0xc]
sub eax, dword [esp + 0x18]
mov ecx, edi
sub eax, 1
push eax
lea eax, [esp + 0x44]
push eax
call fcn.00408f00
mov ecx, dword [ebp + 8]
mov byte [esp + 0x80], 6
mov eax, dword [eax]
push eax
add ecx, 0x10
push ecx
call fcn.00407b60
mov byte [esp + 0x80], 4
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4088bf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
mov ebx, dword [edi]
add eax, 0xfffffff0
sub ebx, 0x10
cmp eax, ebx
je 0x4087f0
cmp dword [ebx + 0xc], 0
lea esi, [ebx + 0xc]
jl 0x408913
mov ecx, dword [eax]
cmp ecx, dword [ebx]
jne 0x408913
push eax
call fcn.00406b40
add esp, 4
mov dword [esp + 0x40], eax
or edx, 0xffffffff
lock xadd dword [esi], edx
dec edx
test edx, edx
jg 0x408905
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov eax, dword [esp + 0x40]
add eax, 0x10
mov dword [edi], eax
jmp 0x4087f0
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx - 0xc]
push eax
push ecx
mov ecx, edi
call fcn.00406920
jmp 0x4087f0
call fcn.00417047
mov ecx, dword [ebx + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov esi, eax
test esi, esi
jne 0x408946
call fcn.00402bc0
mov eax, dword [ebx + 4]
mov dword [esi + 4], eax
mov eax, dword [ebx + 4]
lea ecx, [eax + eax + 2]
push ecx
lea edx, [ebx + 0x10]
push edx
lea eax, [eax + eax + 2]
push eax
lea ecx, [esi + 0x10]
push ecx
call fcn.0042e9f7
add esp, 0x10
mov eax, dword [esp + 0x28]
add eax, 0xc
or edx, 0xffffffff
lock xadd dword [eax], edx
dec edx
test edx, edx
jg 0x40898a
mov eax, dword [esp + 0x28]
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 0x10
mov dword [edi], esi
jmp 0x40899d
mov eax, dword [edx - 0xc]
push eax
push edx
mov ecx, edi
call fcn.00406920
lea ecx, [esp + 0x5c]
mov byte [esp + 0x80], 3
call fcn.0041ba09
mov byte [esp + 0x80], 1
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4089d6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x48]
mov byte [esp + 0x80], 0
call fcn.004196f4
mov dword [esp + 0x80], 0xffffffff
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408a0b
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
xor eax, eax
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea ecx, [esp + 0x5c]
mov byte [esp + 0x80], 3
call fcn.0041ba09
mov byte [esp + 0x80], 1
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408a5b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x48]
mov byte [esp + 0x80], 0
call fcn.004196f4
mov dword [esp + 0x80], 0xffffffff
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 0x408a97
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4