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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x5c
mov ebp, dword [esp + 0x74]
mov esi, dword [esp + 0x78]
mov edx, dword [esp + 0x70]
cmp ebp, 3
jb 0x51e9e5
movzx eax, word [edx]
movzx edi, byte [edx + 2]
xor eax, 0xbbef
xor edi, 0xbf
or di, ax
jne 0x51e9e5
add ebp, 0xfffffffd
add edx, 3
mov ebx, dword [esi + 4]
cmp byte [esi + 3], 0
movzx ecx, byte [esi + 1]
mov eax, 1
movzx edi, word [esi + 5]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], 0
cmove eax, ebx
mov byte [esp + 0x28], cl
rol di, 8
mov byte [esp + 0x29], al
movzx eax, byte [esi]
mov byte [esp + 0x2a], bl
mov word [esp + 0x2b], di
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], 0
mov byte [esp + 0x34], 0x80
mov byte [esp + 0x30], 0
mov byte [esp + 0x32], al
movzx eax, byte [esi + 2]
mov byte [esp + 0x33], al
mov eax, dword [esi + 8]
mov byte [esp + 0x31], 1
test eax, eax
je 0x51ec26
mov edx, dword [esp + 0x7c]
mov ecx, dword [esp + 0x80]
lea ebp, [esp + 0x10]
lea esi, [esp + 0x38]
dec eax
mov dword [esp + 0x48], edx
mov dword [esp + 0x38], VariantInit
mov dword [esp + 0x3c], ecx
mov ecx, ebp
mov edx, esi
mov dword [esp + 0x4c], eax
call fcn.00519330
mov edi, esp
mov edx, ebp
mov ebx, eax
mov ecx, edi
call fcn.0051b200
cmp byte [esp], 0
je 0x51eab9
mov ecx, dword [esp + 4]
test ebx, ebx
jne 0x51eaca
test ecx, ecx
jne 0x51ead5
mov bl, 1
jmp 0x51ebbc
xor ecx, ecx
cmp byte [esp + 1], 0
jne 0x51ebf7
test ebx, ebx
je 0x51eaae
test ecx, ecx
je 0x51ead3
call fcn.0051e580
mov ecx, ebx
mov dword [esp + 0xc], ecx
mov ebx, dword [esp + 0x84]
mov edx, 0xffffffff
mov eax, dword [ecx + 0xc]
test eax, eax
cmovs eax, edx
mov dword [ebx], eax
mov eax, dword [ecx + 0x10]
mov dword [esp], 0
mov dword [esp + 4], 1
mov dword [esp + 0x54], 0
mov dword [esp + 0x48], 0x20
mov byte [esp + 0x58], 3
mov dword [esp + 0x38], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x4c], edi
mov dword [esp + 8], 0
mov dword [esp + 0x50], 0x7a8b18
test eax, eax
cmovns edx, eax
lea eax, [esp + 0xc]
mov dword [ebx + 4], edx
mov dword [ebx + 0x10], 0
push esi
push eax
call fcn.00527410
add esp, 8
test al, al
jne 0x51ec26
mov ebp, dword [esp + 8]
mov eax, dword [esp + 0x84]
xor ebx, ebx
mov edi, dword [esp]
mov esi, dword [esp + 4]
cmp dword [eax + 8], ebp
jb 0x51ebdd
mov eax, dword [esp + 0x84]
mov eax, dword [eax + 0xc]
add eax, ebx
push ebp
push esi
push eax
call fcn.005cc950
add esp, 0xc
add ebx, ebp
jb 0x51ec26
mov eax, dword [esp + 0x84]
test edi, edi
mov dword [eax + 0x10], ebx
je 0x51ebb1
push 1
push edi
push esi
call fcn.0049c910
add esp, 0xc
mov ecx, dword [esp + 0xc]
call fcn.0051e580
xor ebx, ebx
mov eax, dword [esp + 0x10]
test eax, eax
je 0x51ebd3
push 1
push eax
push dword [esp + 0x1c]
call fcn.0049c910
add esp, 0xc
mov eax, ebx
add esp, 0x5c
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebx, dword [esp + 0x84]
xor edx, edx
lea ecx, [ebx + 8]
push ebp
call fcn.00722680
add esp, 4
mov ebx, dword [ebx + 0x10]
jmp 0x51eb78
lea eax, [esp + 0x1c]
mov dword [esp + 0x38], 0x18
push eax
call fcn.00528ab0
add esp, 4
push edx
push eax
push esi
call fcn.00749960
add esp, 0xc
mov ecx, eax
test ebx, ebx
jne 0x51eaca
jmp 0x51eaae
ud2