Function at 0x51d1b0
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 0x51d1e5
movzx eax, word [edx]
movzx edi, byte [edx + 2]
xor eax, 0xbbef
xor edi, 0xbf
or di, ax
jne 0x51d1e5
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 0x51d426
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.00517b30
mov edi, esp
mov edx, ebp
mov ebx, eax
mov ecx, edi
call fcn.00519a00
cmp byte [esp], 0
je 0x51d2b9
mov ecx, dword [esp + 4]
test ebx, ebx
jne 0x51d2ca
test ecx, ecx
jne 0x51d2d5
mov bl, 1
jmp 0x51d3bc
xor ecx, ecx
cmp byte [esp + 1], 0
jne 0x51d3f7
test ebx, ebx
je 0x51d2ae
test ecx, ecx
je 0x51d2d3
call fcn.0051cd80
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], 0x7a2910
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.00525d80
add esp, 8
test al, al
jne 0x51d426
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 0x51d3dd
mov eax, dword [esp + 0x84]
mov eax, dword [eax + 0xc]
add eax, ebx
push ebp
push esi
push eax
call fcn.005c9580
add esp, 0xc
add ebx, ebp
jb 0x51d426
mov eax, dword [esp + 0x84]
test edi, edi
mov dword [eax + 0x10], ebx
je 0x51d3b1
push 1
push edi
push esi
call fcn.0049ce00
add esp, 0xc
mov ecx, dword [esp + 0xc]
call fcn.0051cd80
xor ebx, ebx
mov eax, dword [esp + 0x10]
test eax, eax
je 0x51d3d3
push 1
push eax
push dword [esp + 0x1c]
call fcn.0049ce00
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.0071b4b0
add esp, 4
mov ebx, dword [ebx + 0x10]
jmp 0x51d378
lea eax, [esp + 0x1c]
mov dword [esp + 0x38], 0x18
push eax
call fcn.00527420
add esp, 4
push edx
push eax
push esi
call fcn.00743b00
add esp, 0xc
mov ecx, eax
test ebx, ebx
jne 0x51d2ca
jmp 0x51d2ae
ud2