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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x632f60
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x652018]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push esi
push edi
mov eax, dword [0x652018]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov esi, ecx
mov ebx, dword [ebp + 8]
xor edi, edi
cmp byte [esi + 0x101], 0
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x68], edi
mov dword [esp + 0x18], edi
mov byte [esp + 0x17], 0
je 0x512032
mov edi, 0x10000
mov dword [esp + 0x18], 0
mov dword [esp + 0x68], edi
mov byte [esi + 0x101], 0
mov byte [esp + 0x17], 1
mov edx, dword [ebx + 0x28]
mov ecx, edx
call 0x473b3a
push 0
push 0
push 0
push 0
or edi, 0x104020
mov dword [esp + 0x30], eax
push edi
push edx
mov ecx, esi
call fcn.0045436a
mov edi, eax
test byte [edi + 2], 1
je 0x51207f
mov eax, dword [esi + 0x13c]
test eax, eax
je 0x512070
mov eax, dword [eax + 0x28]
test eax, eax
jne 0x51207a
mov eax, dword [esi + 0x138]
test eax, eax
je 0x51207f
or word [eax + 2], 1
mov al, byte [edi + 2]
and al, 1
jne 0x5120ad
cmp word [edi], 0x68
jne 0x5120ad
mov eax, dword [esp + 0x1c]
sub esp, 8
add ebx, 4
mov ecx, esi
push dword [eax + 0x2c]
push edi
push ebx
call fcn.0046a49a
mov ebx, eax
mov dword [esp + 0x18], ebx
jmp 0x512141
cmp byte [esi + 0x107], 0
je 0x512102
test al, al
jne 0x512102
cmp word [edi], 0x5c
jne 0x5120d5
mov ecx, dword [edi + 0x28]
call 0x3fbb0a
movzx eax, byte [eax]
test byte [eax + eax*2 + 0x405210], 0x40
jne 0x512102
mov ecx, dword [edi + 0x1c]
test ecx, ecx
je 0x512102
call 0x3db1ea
cmp eax, 0x14
jne 0x512102
mov eax, dword [esp + 0x1c]
add ebx, 4
add eax, 0x2c
mov ecx, esi
push eax
push edi
push ebx
call fcn.0046abda
mov ebx, eax
mov dword [esp + 0x18], ebx
jmp 0x512141
cmp byte [esp + 0x17], 0
mov ecx, dword [esp + 0x68]
je 0x512119
or ecx, 0x800000
xor eax, eax
mov dword [esp + 0x18], eax
push 0
push 0
push dword [esp + 0x20]
or ecx, 0x1000
lea eax, [ebx + 4]
push ecx
push dword [ebx + 0x2c]
mov ecx, esi
push dword [esp + 0x34]
push edi
push eax
call fcn.004674ca
mov ebx, eax
mov dword [esp + 0x18], eax
push 0
push 0
push 0x1000
push ebx
mov ecx, esi
call fcn.00458d0a
test byte [ebx + 2], 1
je 0x512181
mov eax, dword [esi + 0x13c]
test eax, eax
je 0x512169
mov eax, dword [eax + 0x28]
test eax, eax
jne 0x512177
mov eax, dword [esi + 0x138]
test eax, eax
je 0x5127cf
or word [eax + 2], 1
jmp 0x5127cf
cmp byte [esi + 0x109], 0
jne 0x5126c4
cmp word [ebx], 0x60
jne 0x5126c4
mov eax, dword [ebx + 0x24]
mov dword [esp + 0x20], eax
mov ecx, dword [eax + 0x28]
call 0x3fbb0a
cmp byte [esi + 0x88], 0
mov ebx, eax
je 0x512572
mov eax, dword [esp + 0x1c]
cmp byte [eax + 0x4c], 0
jne 0x512572
mov ecx, dword [ebx + 0x50]
call 0x3dc92a
test eax, eax
je 0x512572
mov ecx, dword [ebx + 0x50]
call 0x3dc92a
mov ecx, eax
call 0x3e942a
test al, al
jne 0x512572
test byte [ebx + 0x7b], 2
mov byte [esp + 0x17], al
je 0x51221a
mov ecx, dword [esi + 0x110]
call 0x3e0b4a
mov ecx, ebx
mov edi, eax
call 0x3e0b4a
cmp eax, edi
sete al
mov byte [esp + 0x17], al
test al, al
jne 0x5123eb
mov ecx, dword [ebx + 0x50]
call 0x3dc92a
mov edi, eax
movzx ecx, byte [edi]
test byte [ecx + ecx*2 + 0x405211], 0x80
je 0x512242
mov ecx, dword [edi + 0x50]
call 0x3dc92a
mov ecx, eax
call 0x3c4d7a
mov edi, eax
mov ecx, dword [esi + 0x210]
mov eax, dword [ecx]
push dword [eax + 0x10]
lea eax, [ecx + 0x6d0]
push eax
lea ecx, [esp + 0x70]
call fcn.00402cea
cmp dword [esp + 0x68], 1
jne 0x5122ad
mov ecx, dword [esp + 0x6c]
call 0x3da5aa
cmp eax, 6
jne 0x5122ad
mov ecx, dword [esi + 0x210]
mov eax, dword [ecx]
push dword [eax + 0x10]
lea eax, [ecx + 0x6d0]
push eax
lea ecx, [esp + 0x70]
call fcn.00402cea
mov eax, dword [esp + 0x68]
mov ecx, esi
dec eax
neg eax
sbb eax, eax
not eax
and eax, dword [esp + 0x6c]
push eax
push edi
call 0x41e47a
test al, al
jne 0x5123e6
mov ecx, dword [esi + 0x210]
mov eax, dword [ecx]
push dword [eax + 0x10]
lea eax, [ecx + 0x6e4]
push eax
lea ecx, [esp + 0x70]
call fcn.00402cea
cmp dword [esp + 0x68], 1
jne 0x512318
mov ecx, dword [esp + 0x6c]
call 0x3da5aa
cmp eax, 6
jne 0x512318
mov ecx, dword [esi + 0x210]
mov eax, dword [ecx]
push dword [eax + 0x10]
lea eax, [ecx + 0x6e4]
push eax
lea ecx, [esp + 0x70]
call fcn.00402cea
mov eax, dword [esp + 0x68]
mov ecx, esi
dec eax
neg eax
sbb eax, eax
not eax
and eax, dword [esp + 0x6c]
push eax
push edi
call 0x41e47a
test al, al
jne 0x5123e6
mov ecx, dword [esi + 0x210]
mov eax, dword [ecx]
push dword [eax + 0x10]
lea eax, [ecx + 0x6f8]
push eax
lea ecx, [esp + 0x70]
call fcn.00402cea
cmp dword [esp + 0x68], 1
jne 0x51237f
mov ecx, dword [esp + 0x6c]
call 0x3da5aa
cmp eax, 6
jne 0x51237f
mov ecx, dword [esi + 0x210]
mov eax, dword [ecx]
push dword [eax + 0x10]
lea eax, [ecx + 0x6f8]
push eax
lea ecx, [esp + 0x70]
call fcn.00402cea
mov eax, dword [esp + 0x68]
mov ecx, esi
dec eax
neg eax
sbb eax, eax
not eax
and eax, dword [esp + 0x6c]
push eax
push edi
call 0x41e47a
test al, al
jne 0x5123e6
mov ecx, dword [esi + 0x210]
mov eax, dword [ecx]
push dword [eax + 0x10]
lea eax, [ecx + 0x70c]
push eax
lea ecx, [esp + 0x70]
call fcn.00402cea
cmp dword [esp + 0x68], 1
jne 0x5123eb
mov ecx, dword [esp + 0x6c]
call 0x3da5aa
cmp eax, 6
jne 0x5123eb
mov ecx, dword [esi + 0x210]
mov eax, dword [ecx]
push dword [eax + 0x10]
lea eax, [ecx + 0x70c]
push eax
lea ecx, [esp + 0x70]
call fcn.00402cea
mov eax, dword [esp + 0x68]
mov ecx, esi
dec eax
neg eax
sbb eax, eax
not eax
and eax, dword [esp + 0x6c]
push eax
push edi
call 0x41e47a
test al, al
je 0x5123eb
mov byte [esp + 0x17], 1
mov ecx, esi
call fcn.0045d49a
cmp byte [esp + 0x17], 0
jne 0x51255b
cmp eax, 1
je 0x51240b
cmp eax, 2
jne 0x512572
lea edi, [esi + 0x1c]
push edi
lea ecx, [esp + 0x40]
call 0x3cfd5a
mov dword [esp + 0x88], 0
push ecx
push dword [esi + 0x17c]
lea ecx, [esp + 0x54]
push dword [esi + 0xc]
call 0x3cccba
mov byte [esp + 0x88], 1
lea eax, [esp + 0x4c]
mov ecx, dword [esp + 0x20]
sub esp, 0x10
mov dword [edi], eax
mov eax, esp
mov ecx, dword [ecx + 0x2c]
mov byte [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], ecx
mov dword [eax + 0xc], 0
mov ecx, dword [ebx + 0x50]
call 0x3dc92a
lea edx, [esi + 0x6c]
mov ecx, eax
call fcn.0041f37a
mov edi, eax
mov eax, dword [esp + 0x1c]
push 0x26
mov edx, dword [eax + 0x28]
mov eax, dword [esi + 0x14]
mov dword [esp + 0x28], eax
mov ecx, dword [edx + 0xc]
mov dword [esp + 0x6c], ecx
mov ecx, dword [edx + 0x10]
mov dword [esp + 0x70], ecx
mov ecx, dword [edx + 0x14]
mov dword [esp + 0x74], ecx
mov ecx, dword [edx + 0x18]
mov dword [esp + 0x78], ecx
mov eax, dword [edx + 0xc]
mov dword [esp + 0x2c], eax
mov eax, dword [edx + 0x10]
mov dword [esp + 0x30], eax
mov eax, dword [edx + 0x14]
mov dword [esp + 0x34], eax
mov eax, dword [edx + 0x18]
push ecx
mov dword [esp + 0x3c], eax
lea ecx, [esp + 0x2c]
lea eax, [esp + 0x70]
push eax
push edi
call fcn.004e38aa
add esp, 4
lea ecx, [esp + 0x28]
push eax
call 0x4e18ba
push eax
lea ecx, [esp + 0x30]
call 0x4e1b3a
mov edx, dword [esi]
mov ecx, esi
push 0x800
push 0x1000
push eax
lea eax, [esp + 0x74]
push eax
call dword [edx + 4]
mov edi, eax
test byte [edi + 2], 1
jne 0x51252a
mov ecx, dword [esi + 0x1c]
call 0x3ce1ba
test eax, eax
jne 0x51252a
cmp word [edi], 0x35
jne 0x51252a
mov eax, dword [edi + 0x2c]
test eax, eax
je 0x51252a
cmp word [eax], 0x60
mov byte [esp + 0x17], 1
je 0x51252f
mov byte [esp + 0x17], 0
mov byte [esp + 0x88], 0
lea ecx, [esp + 0x4c]
call 0x3d12ca
mov dword [esp + 0x88], 0xffffffff
lea ecx, [esp + 0x3c]
call 0x3cfd8a
cmp byte [esp + 0x17], 0
je 0x512572
mov eax, dword [esp + 0x1c]
mov ecx, esi
mov eax, dword [eax + 0x28]
add eax, 0xc
push eax
push 0xa576
call fcn.00421dba
mov eax, dword [esi]
mov ecx, esi
mov eax, dword [eax + 0x1c]
call eax
test al, al
jne 0x5126c4
mov ecx, dword [ebx + 0x50]
call 0x3dc92a
test eax, eax
jne 0x5126c4
mov ecx, ebx
call 0x3e9c8a
cmp byte [eax], 0x17
je 0x5126c4
lea eax, [esp + 0x20]
mov ecx, ebx
push eax
call 0x3da68a
mov ecx, eax
call 0x3efb4a
mov ebx, dword [esp + 0x20]
test ebx, ebx
je 0x5126c4
jmp 0x5125ca
mov eax, dword [esi + 0x7c]
mov byte [esp + 0x17], 0
mov ecx, dword [eax + 0xac]
call 0x3dad4a
push 0
push 0
push 0xffffffffffffffff
mov edi, eax
mov ecx, esi
push 0
lea eax, [esp + 0x27]
push eax
mov eax, dword [esp + 0x30]
add eax, 4
push eax
call 0x400b8a
push eax
push 0
push 0x40028
push dword [ebx]
mov ecx, esi
push 0
push edi
call 0x3fbb6a
mov ecx, eax
call 0x400dda
cmp byte [esp + 0x17], 0
mov edi, eax
jne 0x5126b4
test edi, edi
jne 0x512686
mov eax, dword [esi + 0x7c]
mov eax, dword [eax + 0x58]
test eax, eax
je 0x512639
mov ecx, dword [eax + 0x1558]
jmp 0x51263b
xor ecx, ecx
call 0x3dad4a
push 0
push 0
push 0xffffffffffffffff
mov edi, eax
mov ecx, esi
push 0
lea eax, [esp + 0x27]
push eax
mov eax, dword [esp + 0x30]
add eax, 4
push eax
call 0x400b8a
push eax
push 0
push 0x40028
push dword [ebx]
mov ecx, esi
push 0
push edi
call 0x3fbb6a
mov ecx, eax
call 0x400dda
cmp byte [esp + 0x17], 0
mov edi, eax
jne 0x5126b4
test edi, edi
je 0x5126b4
mov ecx, edi
call 0x3dd2ea
test al, al
jne 0x5126b4
mov ecx, dword [edi + 0x60]
lea eax, [esp + 0x24]
push eax
call 0x3e949a
mov eax, dword [esp + 0x34]
add eax, 0xfffffffd
cmp eax, 8
ja 0x5126b4
mov eax, dword [esp + 0x24]
or eax, dword [esp + 0x28]
jne 0x5126c4
mov ebx, dword [ebx + 4]
test ebx, ebx
jne 0x5125ca
jmp 0x5127cf
mov eax, dword [esp + 0x1c]
lea ecx, [esi + 0x24]
push 0x30
movzx edi, word [eax + 0x20]
call fcn.0053ac4a
mov ebx, eax
mov eax, 0x1e
mov word [ebx], ax
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 4]
mov dword [ebx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [ebx + 8], ecx
mov ecx, dword [eax + 0xc]
mov dword [ebx + 0xc], ecx
lea ecx, [ebx + 0x18]
mov eax, dword [eax + 0x10]
mov dword [ebx + 0x10], eax
mov word [ebx + 0x20], di
mov eax, dword [esi + 0x1d8]
mov dword [ebx + 0x24], eax
mov eax, dword [esi + 0x12c]
mov dword [ebx + 0x14], eax
mov dword [ecx], 0
mov eax, dword [esi + 0x10c]
mov dword [ebx + 0x1c], eax
mov eax, dword [esi + 0x128]
mov dword [eax], ebx
mov eax, dword [esp + 0x18]
mov dword [esi + 0x128], ecx
mov dword [esi + 0x12c], ebx
mov dword [ebx + 0x28], eax
cmp byte [esi + 0x100], 0
je 0x5127cf
movzx ecx, word [eax]
cmp cx, 0x60
je 0x512764
cmp cx, 0x61
jne 0x5127cf
mov eax, dword [eax + 0x24]
cmp word [eax], 0x60
jne 0x5127cf
mov eax, dword [eax + 0x24]
mov ecx, dword [eax + 0x28]
call 0x3fbb0a
mov dword [esp + 0x18], eax
test byte [eax + 0x79], 4
je 0x5127cf
test byte [eax + 1], 8
jne 0x5127cf
mov ecx, eax
call 0x3e9d1a
mov ecx, esi
mov edi, eax
call 0x400b8a
mov ecx, dword [esi + 0x15c]
sub edi, eax
neg edi
sbb edi, edi
not edi
and edi, dword [esp + 0x18]
push edi
push dword [esi + 0x14c]
call 0x48f71a
mov ecx, dword [esp + 0x18]
call 0x3e9d1a
mov ecx, esi
mov edi, eax
call 0x400b8a
cmp edi, eax
je 0x5127ca
mov ecx, esi
call fcn.0041ab5a
or word [ebx + 2], 0x10
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call 0x59f19b
mov esp, ebp