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

Disassembly:
push 0xffffffffffffffff
push 0x582200
mov eax, dword fs:[0]
push eax
sub esp, 0x44
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5e95e0]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
mov eax, dword [esp + 0x70]
mov ebp, dword [esp + 0x68]
xor edx, edx
cmp dword [ebp + 0x168], edx
je 0x4ff5f3
mov ecx, dword [esp + 0x74]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], edx
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x30], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x34], edx
mov edx, dword [eax + 0xc]
push 2
mov dword [esp + 0x3c], ecx
lea edi, [ebp + 0x40]
push 0x5c0394
mov ecx, edi
mov dword [esp + 0x44], edx
call fcn.00402250
push edi
lea esi, [ebp + 0x264]
call fcn.00507190
mov eax, dword [edi]
push edi
push eax
push ebp
call fcn.00502f20
push ecx
mov ecx, esp
mov dword [esp + 0x78], esp
push eax
call fcn.00402390
mov ebx, ebp
call fcn.00503260
xor ebx, ebx
mov dword [esp + 0x70], ebx
call fcn.00530e1f
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4ff669
push 0x80004005
call fcn.00401f70
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x68], eax
lea ecx, [esp + 0x70]
push ecx
mov ecx, dword [esp + 0x70]
lea edx, [esp + 0x6c]
push edx
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x6c], 1
call fcn.00504410
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4ff6b9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x20]
push ecx
lea esi, [esp + 0x6c]
call fcn.005046c0
push ebx
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x30]
mov byte [esp + 0x68], 2
push eax
push ebp
mov dword [ebp + 0x98], ebx
mov dword [ebp + 0x94], ebx
mov dword [ebp + 0xa0], ebx
mov dword [ebp + 0x9c], ebx
call fcn.00505420
mov eax, dword [ebp + 0x168]
cmp eax, 1
jne 0x4ff763
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov dword [eax], ecx
mov dword [eax + 4], edx
mov ecx, dword [ebp + 0x94]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], 0
cmp dword [ebp + 0x94], 0
jle 0x4ff731
mov dword [eax + 0x18], 1
mov esi, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x50], esi
mov esi, dword [esp + 0x3c]
mov dword [esp + 0x54], esi
mov esi, dword [eax + 8]
add esi, edx
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], ecx
jmp 0x4ff87c
test eax, eax
jne 0x4ff878
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x50], ecx
mov ecx, dword [ebp + 0x7c]
test ecx, ecx
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x48], edx
mov dword [esp + 0x54], eax
jl 0x4ff7bd
mov edx, dword [ebp + 0x74]
mov eax, dword [ebp + 0x70]
mov ebx, dword [ebp + 0x160]
push 0
push 5
push edx
mov edx, dword [ebp + 0x64]
push eax
push edx
push ecx
lea eax, [ebp + 0xd4]
push eax
lea eax, [esp + 0x64]
call fcn.004f9990
mov eax, dword [esp + 0x54]
cmp dword [ebp + 0x148], 0
mov esi, dword [ebp + 0x160]
je 0x4ff7ee
mov ecx, dword [ebp + 0x8c]
test ecx, ecx
mov edx, dword [ebp + 0x68]
mov edi, dword [ebp + 0x6c]
je 0x4ff81b
push 1
push ecx
mov ecx, dword [esp + 0x58]
push edx
mov edx, dword [esp + 0x58]
push edi
push eax
push ecx
push edx
jmp 0x4ff80e
mov edx, dword [ebp + 0x8c]
test edx, edx
mov ecx, dword [ebp + 0x14c]
je 0x4ff81b
push 1
push edx
push ecx
push ecx
mov ecx, dword [esp + 0x5c]
push eax
mov eax, dword [esp + 0x64]
push eax
push ecx
mov eax, dword [esp + 0x64]
call fcn.004faa90
mov eax, dword [esp + 0x54]
mov ecx, dword [ebp + 0xa8]
mov edx, dword [ebp + 0x90]
lea esi, [edx + ecx]
add dword [esp + 0x48], esi
add dword [esp + 0x4c], esi
lea esi, [edx + ecx]
sub dword [esp + 0x50], esi
add edx, ecx
mov ecx, dword [ebp + 0x88]
sub eax, edx
sub ecx, 1
mov dword [esp + 0x54], eax
je 0x4ff860
sub ecx, 1
jne 0x4ff878
mov edx, dword [esp + 0x74]
sub eax, dword [edx + 0xc]
mov dword [esp + 0x4c], eax
mov eax, edx
jmp 0x4ff87c
mov ecx, dword [esp + 0x74]
sub eax, dword [ecx + 0xc]
mov ecx, dword [esp + 0x4c]
sub eax, ecx
cdq
sub eax, edx
sar eax, 1
add ecx, eax
mov dword [esp + 0x4c], ecx
mov eax, dword [esp + 0x74]
mov edx, dword [esp + 0x6c]
mov ecx, dword [edx]
mov ecx, dword [ecx - 0xc]
mov ebx, dword [esp + 0x70]
cmp ebx, ecx
jge 0x4ff9f4
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push 0x5c039c
mov dword [esp + 0x78], ebx
mov dword [esp + 0x1c], ebx
call fcn.00402390
mov edi, dword [esp + 0x70]
lea esi, [esp + 0x74]
call fcn.005049a0
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push str.table
call fcn.00402390
lea esi, [esp + 0x18]
call fcn.005049a0
mov eax, dword [esp + 0x70]
mov esi, dword [esp + 0x14]
cmp eax, esi
mov edi, eax
jl 0x4ff8e1
mov edi, esi
xor ecx, ecx
cmp edi, ebx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ecx
jle 0x4ff92f
mov ecx, dword [esp + 0x6c]
mov edx, edi
sub edx, ebx
push edx
push ebx
lea eax, [esp + 0x20]
push eax
call fcn.004269f0
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x38]
push eax
push ebp
mov byte [esp + 0x70], 3
call fcn.004ffad0
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov byte [esp + 0x60], 2
mov eax, dword [esp + 0x18]
mov ebx, edi
jmp 0x4ff986
cmp esi, eax
jge 0x4ff9ac
mov edi, dword [esp + 0x6c]
lea ecx, [esp + 0x70]
push ecx
mov eax, edi
mov dword [esp + 0x74], esi
call fcn.00505230
mov ebx, dword [esp + 0x70]
mov edx, ebx
sub edx, esi
push edx
push esi
lea eax, [esp + 0x24]
push eax
mov ecx, edi
call fcn.004269f0
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x48]
push eax
mov ecx, ebp
mov byte [esp + 0x6c], 4
call fcn.004fda70
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov byte [esp + 0x60], 2
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], ecx
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4ff9b5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4ff9b5
mov ecx, dword [esp + 0x6c]
mov edx, dword [ecx]
mov ebx, dword [edx - 0xc]
cmp dword [ebp + 0x168], 0
je 0x4ff9d9
mov eax, dword [esp + 0x74]
mov ecx, dword [eax + 8]
mov edx, dword [esp + 0x28]
cmp edx, ecx
jle 0x4ff9cf
mov ecx, edx
mov dword [eax + 8], ecx
mov ecx, dword [esp + 0x2c]
add dword [eax + 0xc], ecx
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x2c]
mov ecx, dword [eax]
add dword [esp + 0x4c], edx
cmp ebx, dword [ecx - 0xc]
jl 0x4ff891
mov eax, dword [esp + 0x74]
cmp dword [ebp + 0x168], 0
je 0x4ffa45
mov ecx, dword [ebp + 0x94]
mov esi, dword [eax + 8]
cmp ecx, esi
jle 0x4ffa0c
mov esi, ecx
mov edx, dword [eax + 0xc]
mov dword [eax + 0x10], esi
mov ecx, dword [ebp + 0x98]
cmp ecx, edx
jg 0x4ffa1e
mov ecx, edx
mov dword [eax + 0x14], ecx
mov edx, dword [ebp + 0xa8]
add edx, dword [ebp + 0x90]
lea edx, [esi + edx*2]
mov dword [eax + 0x10], edx
mov edx, dword [ebp + 0xa8]
add edx, dword [ebp + 0x90]
lea ecx, [ecx + edx*2]
mov dword [eax + 0x14], ecx
push 2
push 0x5c0394
lea ecx, [ebp + 0x40]
call fcn.00402250
push 1
mov edi, ebp
call fcn.00502140
test eax, eax
je 0x4ffa68
mov esi, ebp
call fcn.00502370
mov byte [esp + 0x60], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4ffa8d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x60], 0xffffffff
mov eax, dword [esp + 0x68]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4ffab5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret 0x10