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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x51337b
sub esp, 0x68
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x60], ecx
mov eax, dword [esp + 0x78]
mov dword [esp + 0x64], eax
mov edx, dword [esp + 0x60]
test edx, edx
je 0x513372
lea ebx, [0x612f9c]
test ecx, ecx
je 0x513367
nop
movzx ebp, byte [0x7016e8]
xchg ebp, eax
test al, al
xchg ebp, eax
je 0x512daf
mov ebp, dword [esp + 0x74]
mov dword [0x7016ec], ebp
mov ebp, dword [0x71e9f0]
test ebp, ebp
jne 0x513357
mov dword [0x7016f0], eax
mov dword [esp + 0x58], ecx
mov dword [esp + 0x5c], eax
mov ecx, dword [esp + 0x58]
test ecx, ecx
je 0x51334c
nop
movzx ebp, byte [ecx + 0xf]
mov esi, ebp
and ebp, 0x1f
xchg esi, eax
test al, 0x20
xchg esi, eax
jne 0x512dda
or ebp, 0x80
mov dword [esp + 0x40], edx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
mov esi, dword [ebx + 0x50]
mov dword [esp], edx
call esi
cmp dword [esp + 4], 0x19
jne 0x513316
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 0x64]
mov ecx, dword [esp + 0x40]
mov dword [esp], ecx
call eax
mov eax, dword [esp + 4]
mov dword [esp + 0x34], eax
xor ecx, ecx
jmp 0x512e28
mov edx, dword [esp + 0x30]
lea ecx, [edx + 1]
mov eax, dword [esp + 0x34]
cmp eax, ecx
jle 0x5132ff
mov dword [esp + 0x30], ecx
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
mov edx, dword [esp + 0x38]
mov dword [esp + 4], edx
mov ebx, dword [esp + 0x24]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], ecx
call fcn.004b2670
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
mov byte [esp + 0xc], 1
call fcn.004b2d80
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x50], ecx
mov edx, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x4c], ecx
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x14]
test eax, eax
je 0x512f3e
mov eax, dword [eax + 8]
cmp eax, 0x86318d2e
ja 0x5130a8
cmp eax, 0x382e7edf
ja 0x512fd0
cmp eax, 0x1c184284
jne 0x512f74
lea eax, [0x5a2720]
cmp eax, edx
jne 0x512f3e
mov dword [esp], eax
call fcn.0040b910
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0x48]
mov ecx, dword [ecx]
mov dword [eax], ecx
mov ecx, dword [esp + 0x6c]
mov dword [esp], ecx
mov edx, dword [esp + 0x70]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov dword [esp + 0xc], 4
mov dword [esp + 0x10], 4
call fcn.00514290
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
test eax, eax
je 0x512e1d
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x80], edx
add esp, 0x68
ret
lea eax, [0x5abc80]
mov dword [esp], eax
call fcn.0040b910
mov eax, dword [esp + 4]
mov dword [eax + 4], 0xe
lea ecx, [0x5d2482]
mov dword [eax], ecx
lea ecx, [0x61098c]
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x80], eax
add esp, 0x68
ret
cmp eax, 0x382e7edf
jne 0x512f3e
lea eax, [0x59f6e0]
cmp eax, edx
jne 0x512f3e
mov eax, dword [edi + 4]
mov ecx, dword [edi + 8]
mov edx, dword [edi]
mov ebx, dword [esp + 0x6c]
mov dword [esp], ebx
mov ebp, dword [esp + 0x70]
mov dword [esp + 4], ebp
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ecx
call fcn.00514290
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
test eax, eax
je 0x512e1d
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x80], edx
add esp, 0x68
ret
cmp eax, 0x46fb81a2
jne 0x513046
lea eax, [0x5a23a0]
cmp eax, edx
jne 0x512f3e
mov dword [esp], eax
call fcn.0040b910
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0x4c]
movzx ecx, word [ecx]
mov word [eax], cx
mov ecx, dword [esp + 0x6c]
mov dword [esp], ecx
mov edx, dword [esp + 0x70]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov dword [esp + 0xc], 2
mov dword [esp + 0x10], 2
call fcn.00514290
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
test eax, eax
je 0x512e1d
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x80], edx
add esp, 0x68
ret
cmp eax, 0x86318d2e
jne 0x512f3e
lea eax, [0x5a5d60]
cmp eax, edx
jne 0x512f3e
mov eax, dword [ebp]
mov ecx, dword [ebp + 4]
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.005117c0
mov eax, dword [esp + 0x6c]
mov dword [esp], eax
mov ecx, dword [esp + 0x70]
mov dword [esp + 4], ecx
call fcn.00514290
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
test eax, eax
je 0x512e1d
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x80], edx
add esp, 0x68
ret
cmp eax, 0xd04ae83d
ja 0x5131df
cmp eax, 0xa8ff599c
jne 0x513134
lea eax, [0x5a2460]
cmp eax, edx
jne 0x512f3e
mov dword [esp + 0x44], ecx
mov dword [esp], eax
call fcn.0040b910
mov edi, dword [esp + 4]
mov dword [esp + 0x54], edi
mov esi, dword [esp + 0x44]
call fcn.0045e960
mov eax, dword [esp + 0x6c]
mov dword [esp], eax
mov ecx, dword [esp + 0x70]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x54]
mov dword [esp + 8], edx
mov dword [esp + 0xc], 0x20
mov dword [esp + 0x10], 0x20
call fcn.00514290
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
test eax, eax
je 0x512e1d
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x80], edx
add esp, 0x68
ret
cmp eax, 0xd04ae83d
jne 0x512f3e
lea eax, [0x5a5d20]
cmp eax, edx
jne 0x512f3e
mov eax, dword [ebx]
mov dword [esp + 0x28], eax
lea ecx, [0x5a5da0]
mov dword [esp], ecx
mov dword [esp + 4], 4
mov dword [esp + 8], 4
call fcn.004451f0
mov eax, dword [esp + 0xc]
nop
mov ecx, dword [esp + 0x28]
mov edx, ecx
shr ecx, 0x18
mov byte [eax], cl
mov ecx, edx
shr edx, 0x10
mov byte [eax + 1], dl
mov edx, ecx
shr ecx, 8
mov byte [eax + 2], cl
mov byte [eax + 3], dl
mov ecx, dword [esp + 0x6c]
mov dword [esp], ecx
mov edx, dword [esp + 0x70]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov dword [esp + 0xc], 4
mov dword [esp + 0x10], 4
call fcn.00514290
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
test eax, eax
je 0x512e1d
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x80], edx
add esp, 0x68
ret
cmp eax, 0xe0ff5cb4
jne 0x51325c
lea eax, [0x5a5ba0]
cmp eax, edx
jne 0x512f3e
mov eax, dword [esi + 4]
mov ecx, dword [esi]
mov dword [esp], 0
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.00448990
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov ebx, dword [esp + 0x6c]
mov dword [esp], ebx
mov ebp, dword [esp + 0x70]
mov dword [esp + 4], ebp
mov dword [esp + 8], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], edx
call fcn.00514290
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
test eax, eax
je 0x512e1d
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x80], edx
add esp, 0x68
ret
cmp eax, 0xeff20ea0
jne 0x512f3e
lea eax, [0x5a5ce0]
cmp eax, edx
jne 0x512f3e
mov eax, dword [esp + 0x50]
movzx eax, word [eax]
mov word [esp + 0x22], ax
lea ecx, [0x5a5da0]
mov dword [esp], ecx
mov dword [esp + 4], 2
mov dword [esp + 8], 2
call fcn.004451f0
mov eax, dword [esp + 0xc]
nop
movzx ecx, word [esp + 0x22]
mov edx, ecx
shr cx, 8
mov byte [eax], cl
mov byte [eax + 1], dl
mov ecx, dword [esp + 0x6c]
mov dword [esp], ecx
mov edx, dword [esp + 0x70]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov dword [esp + 0xc], 2
mov dword [esp + 0x10], 2
call fcn.00514290
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
test eax, eax
je 0x512e1d
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x80], edx
add esp, 0x68
ret
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
add esp, 0x68
ret
lea eax, [0x5abc80]
mov dword [esp], eax
call fcn.0040b910
mov eax, dword [esp + 4]
mov dword [eax + 4], 0x1a
lea ecx, [0x5d6a5c]
mov dword [eax], ecx
lea ecx, [0x61098c]
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x80], eax
add esp, 0x68
ret
xor ebp, ebp
xor ecx, ecx
xor eax, eax
jmp 0x512dda
lea edi, [0x7016f0]
call fcn.0045e220
jmp 0x512daf
xor ebp, ebp
xor ecx, ecx
xor eax, eax
jmp 0x512dda
xor ebx, ebx
xor edx, edx
jmp 0x512d7b
call fcn.0045ccc0
jmp fcn.00512d40