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

Disassembly:
push 0xffffffffffffffff
push 0x5aad90
mov eax, dword fs:[0]
push eax
sub esp, 0x44
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6336a0]
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 + 0x164], edx
je 0x521e73
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 + 0x3c]
push 0x604234
mov ecx, edi
mov dword [esp + 0x44], edx
call fcn.00402270
push edi
lea esi, [ebp + 0x260]
call fcn.00529b70
mov eax, dword [edi]
push edi
push eax
push ebp
call fcn.005257a0
push ecx
mov ecx, esp
mov dword [esp + 0x78], esp
push eax
call fcn.004023b0
mov ebx, ebp
call fcn.00525ae0
xor ebx, ebx
mov dword [esp + 0x70], ebx
call fcn.00555692
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x521ee9
push 0x80004005
call fcn.00401f90
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.00526c90
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 0x521f39
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.00526f40
push ebx
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x30]
mov byte [esp + 0x68], 2
push eax
push ebp
mov dword [ebp + 0x94], ebx
mov dword [ebp + 0x90], ebx
mov dword [ebp + 0x9c], ebx
mov dword [ebp + 0x98], ebx
call fcn.00527ca0
mov eax, dword [ebp + 0x164]
cmp eax, 1
jne 0x521fe3
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 + 0x90]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], 0
cmp dword [ebp + 0x90], 0
jle 0x521fb1
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 0x5220fc
test eax, eax
jne 0x5220f8
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x50], ecx
mov ecx, dword [ebp + 0x78]
test ecx, ecx
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x48], edx
mov dword [esp + 0x54], eax
jl 0x52203d
mov edx, dword [ebp + 0x70]
mov eax, dword [ebp + 0x6c]
mov ebx, dword [ebp + 0x15c]
push 0
push 5
push edx
mov edx, dword [ebp + 0x60]
push eax
push edx
push ecx
lea eax, [ebp + 0xd0]
push eax
lea eax, [esp + 0x64]
call fcn.0051c240
mov eax, dword [esp + 0x54]
cmp dword [ebp + 0x144], 0
mov esi, dword [ebp + 0x15c]
je 0x52206e
mov ecx, dword [ebp + 0x88]
test ecx, ecx
mov edx, dword [ebp + 0x64]
mov edi, dword [ebp + 0x68]
je 0x52209b
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 0x52208e
mov edx, dword [ebp + 0x88]
test edx, edx
mov ecx, dword [ebp + 0x148]
je 0x52209b
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.0051d340
mov eax, dword [esp + 0x54]
mov ecx, dword [ebp + 0xa4]
mov edx, dword [ebp + 0x8c]
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 + 0x84]
sub eax, edx
sub ecx, 1
mov dword [esp + 0x54], eax
je 0x5220e0
sub ecx, 1
jne 0x5220f8
mov edx, dword [esp + 0x74]
sub eax, dword [edx + 0xc]
mov dword [esp + 0x4c], eax
mov eax, edx
jmp 0x5220fc
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 0x522274
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push 0x60423c
mov dword [esp + 0x78], ebx
mov dword [esp + 0x1c], ebx
call fcn.004023b0
mov edi, dword [esp + 0x70]
lea esi, [esp + 0x74]
call fcn.00527220
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push str.table
call fcn.004023b0
lea esi, [esp + 0x18]
call fcn.00527220
mov eax, dword [esp + 0x70]
mov esi, dword [esp + 0x14]
cmp eax, esi
mov edi, eax
jl 0x522161
mov edi, esi
xor ecx, ecx
cmp edi, ebx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ecx
jle 0x5221af
mov ecx, dword [esp + 0x6c]
mov edx, edi
sub edx, ebx
push edx
push ebx
lea eax, [esp + 0x20]
push eax
call fcn.00423ae0
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.00522350
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov byte [esp + 0x60], 2
mov eax, dword [esp + 0x18]
mov ebx, edi
jmp 0x522206
cmp esi, eax
jge 0x52222c
mov edi, dword [esp + 0x6c]
lea ecx, [esp + 0x70]
push ecx
mov eax, edi
mov dword [esp + 0x74], esi
call fcn.00527ab0
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.00423ae0
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.005202f0
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 0x522235
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x522235
mov ecx, dword [esp + 0x6c]
mov edx, dword [ecx]
mov ebx, dword [edx - 0xc]
cmp dword [ebp + 0x164], 0
je 0x522259
mov eax, dword [esp + 0x74]
mov ecx, dword [eax + 8]
mov edx, dword [esp + 0x28]
cmp edx, ecx
jle 0x52224f
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 0x522111
mov eax, dword [esp + 0x74]
cmp dword [ebp + 0x164], 0
je 0x5222c5
mov ecx, dword [ebp + 0x90]
mov esi, dword [eax + 8]
cmp ecx, esi
jle 0x52228c
mov esi, ecx
mov edx, dword [eax + 0xc]
mov dword [eax + 0x10], esi
mov ecx, dword [ebp + 0x94]
cmp ecx, edx
jg 0x52229e
mov ecx, edx
mov dword [eax + 0x14], ecx
mov edx, dword [ebp + 0xa4]
add edx, dword [ebp + 0x8c]
lea edx, [esi + edx*2]
mov dword [eax + 0x10], edx
mov edx, dword [ebp + 0xa4]
add edx, dword [ebp + 0x8c]
lea ecx, [ecx + edx*2]
mov dword [eax + 0x14], ecx
push 2
push 0x604234
lea ecx, [ebp + 0x3c]
call fcn.00402270
push 1
mov edi, ebp
call fcn.005249c0
test eax, eax
je 0x5222e8
mov esi, ebp
call fcn.00524bf0
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 0x52230d
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 0x522335
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