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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x78
mov edi, dword [ebp + 0xc]
mov ebx, edx
mov dword [esp + 0x18], ecx
mov dword [esp + 8], edx
mov esi, dword [edi + 0x10]
test esi, esi
je 0x51d06e
lea eax, [esi - 1]
cmp dword [edi + 0xc], eax
jbe 0x51d06e
mov ecx, dword [edi + 8]
test ecx, ecx
je 0x51d06e
movzx eax, byte [ecx + eax]
mov ecx, dword [ebx + 0x260]
mov edx, dword [ebx + 0x268]
or edx, dword [ebx + 0x278]
or ecx, dword [ebx + 0x270]
mov byte [esp + 0x24], al
mov eax, dword [ebx + 0x26c]
or ecx, edx
mov edx, dword [ebx + 0x264]
or eax, dword [ebx + 0x27c]
or edx, dword [ebx + 0x274]
or edx, eax
movzx eax, byte [esp + 0x24]
or edx, ecx
mov ecx, dword [edi + 4]
mov edx, dword [edi]
mov edi, dword [ebp + 8]
mov dword [esp + 0x14], eax
mov dword [esp], ecx
je 0x51d0b8
mov ch, byte [esp + 0x24]
mov dword [esp + 0x70], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x64], 1
mov dword [esp + 0x60], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x54], 0
mov al, ch
and ch, 7
and al, 0x78
mov cl, ch
shr al, 3
neg al
movsx eax, al
mov dword [esp + 4], eax
mov ebx, dword [esp + eax + 0x6c]
mov eax, dword [esp + eax + 0x70]
shld eax, ebx, cl
shl ebx, cl
not cl
mov dword [esp + 0x10], eax
mov eax, dword [esp + 4]
mov eax, dword [esp + eax + 0x68]
mov dword [esp + 0xc], edx
mov edx, eax
mov edi, eax
mov eax, dword [esp + 0x14]
shr edx, 1
shr edx, cl
mov cl, ch
or edx, ebx
mov ebx, dword [esp + 4]
shr eax, 3
and eax, 0xfffffff0
mov ebx, dword [esp + ebx + 0x64]
shld edi, ebx, cl
shl ebx, cl
mov ecx, dword [esp + 8]
mov dword [esp + 0x48], edi
add ecx, 0x260
mov dword [esp + 4], ecx
and edx, dword [ecx + eax + 8]
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 4]
and ecx, dword [edi + eax + 0xc]
mov edi, dword [esp + 0x48]
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 4]
and edi, dword [ecx + eax + 4]
and ebx, dword [ecx + eax]
or edi, dword [esp + 0x10]
or ebx, edx
mov edx, dword [esp + 0xc]
or edi, ebx
mov ebx, dword [esp + 8]
mov edi, dword [ebp + 8]
je 0x51d0b8
movzx eax, byte [esp + 0x24]
mov dword [esp + 0x28], 4
mov byte [esp + 0x2c], al
jmp 0x51d0f7
mov eax, dword [edi + 4]
mov edx, dword [edi]
mov edi, dword [ebp + 8]
mov dword [esp], eax
mov al, 2
movzx ecx, al
test edx, edx
je 0x51d0c8
cmp edx, 1
jne 0x51d09d
add ecx, 6
mov dword [esp + 0xc], edx
mov edx, dword [edi + 0x88]
cmp ecx, edx
jb 0x51d0da
jmp 0x51d3c6
test byte [ebx + 0x59], 1
jne 0x51d395
mov eax, dword [esp]
mov dword [esp + 0x28], 2
mov dword [esp + 0x2c], eax
jmp 0x51d0f7
mov eax, dword [esp + 0x14]
movzx eax, byte [ebx + eax + 0x60]
movzx ecx, al
test edx, edx
jne 0x51d082
mov dword [esp + 0xc], edx
mov edx, dword [edi + 0x88]
cmp ecx, edx
jae 0x51d3c6
mov edx, dword [edi + 0x84]
mov edx, dword [edx + ecx*4]
test edx, edx
js 0x51d47c
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], 5
lea ebx, [esp + 0x28]
lea ecx, [esp + 0x30]
mov edx, ebx
push esi
call fcn.004d9ba0
add esp, 4
cmp dword [esp + 0x30], 0
mov edi, dword [esp + 0x34]
je 0x51d14d
mov dword [esp + 0x50], edi
movzx eax, byte [edi]
test eax, eax
je 0x51d129
cmp eax, 1
jne 0x51d71d
mov esi, dword [edi + 4]
push edi
push 0
push dword [0x94bf18]
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [esp + 0x18]
mov dword [eax + 4], esi
mov dword [eax], 2
jmp 0x51d6bd
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x14]
mov ebx, dword [ecx + 0xc]
cmp esi, edx
mov dword [esp], edx
mov dword [esp + 0x20], ebx
jae 0x51d2ee
mov eax, dword [ecx + 8]
mov dword [esp + 0x10], 0
mov dword [esp + 0x24], eax
mov eax, dword [esp + 8]
mov edx, dword [eax + 0x280]
mov eax, dword [eax + 0x284]
and eax, 0x1f
cmp ebx, esi
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], eax
movzx eax, byte [ecx + 0x18]
mov byte [esp + 0x1f], al
mov eax, esi
cmova eax, ebx
mov ebx, dword [ebp + 8]
mov dword [esp + 0xc], eax
jmp 0x51d1bc
mov edx, dword [esp]
inc esi
cmp edx, esi
je 0x51d3d0
cmp dword [esp + 0xc], esi
je 0x51d6e7
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 8]
movzx eax, byte [eax + esi]
movzx edx, byte [ecx + eax + 0x160]
mov ecx, edi
and ecx, 0x7ffffff
add ecx, edx
mov edx, dword [ebx + 0x7c]
cmp ecx, edx
jae 0x51d6dd
mov edx, dword [ebx + 0x78]
mov edx, dword [edx + ecx*4]
test edx, edx
js 0x51d2bc
mov edi, edx
cmp edx, 0x7ffffff
jbe 0x51d1b0
mov edx, dword [esp]
test edi, 0x8000000
jne 0x51d230
test edi, 0x40000000
jne 0x51d4e9
test edi, 0x20000000
je 0x51d1b3
jmp 0x51d2e2
mov eax, dword [esp + 0x48]
mov dword [esp + 0x14], 0
cmp dword [eax + 0x15c], 1
je 0x51d2a0
mov eax, ebx
mov ebx, edi
mov ecx, dword [esp + 0x4c]
mov edx, dword [eax + 0x94]
and ebx, 0x7ffffff
shr ebx, cl
cmp ebx, edx
jae 0x51d6f9
mov ecx, dword [eax + 0x90]
mov edx, dword [esp]
mov eax, dword [ecx + ebx*8 + 4]
test eax, eax
je 0x51d705
mov ecx, dword [ecx + ebx*8]
mov ebx, dword [ebp + 8]
test byte [ecx + 8], 2
je 0x51d2a0
cmp eax, 0xd
jb 0x51d75f
add eax, 0xfffffff3
cmp eax, 3
jbe 0x51d770
mov eax, dword [ecx + 0x15]
mov dword [esp + 0x14], eax
cmp byte [esp + 0x1f], 0
mov dword [esp + 0x10], 1
jne 0x51d508
mov dword [esp + 4], esi
jmp 0x51d1b3
mov ecx, dword [esp + 8]
shl eax, 8
mov edx, edi
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], ebx
lea ecx, [esp + 0x30]
push eax
call fcn.007c8760
add esp, 4
test eax, eax
je 0x51d1fd
movzx eax, byte [0x94bfc5]
jmp 0x51d13b
mov ebx, dword [ebp + 8]
mov dword [esp + 0x10], 0
cmp edx, dword [esp + 0x20]
jae 0x51d3dc
mov eax, dword [ebp + 0xc]
mov ecx, dword [esp + 8]
mov eax, dword [eax + 8]
movzx eax, byte [eax + edx]
mov byte [esp + 0xc], al
movzx eax, al
movzx edx, byte [ecx + eax + 0x160]
mov ecx, edi
and ecx, 0x7ffffff
add ecx, edx
mov edx, dword [ebx + 0x7c]
cmp ecx, edx
jae 0x51d6dd
mov edx, dword [ebx + 0x78]
mov ebx, dword [edx + ecx*4]
test ebx, ebx
js 0x51d549
test ebx, 0x8000000
jne 0x51d613
mov edi, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
test ebx, 0x20000000
je 0x51d6a3
movzx eax, byte [0x94bfc5]
xor ecx, ecx
mov edx, 0xc
call fcn.0071ee80
test eax, eax
je 0x51d5f6
movzx ecx, byte [esp + 0xc]
mov byte [eax], 0
mov esi, dword [esp + 0x18]
mov byte [eax + 1], cl
mov ecx, dword [esp]
jmp 0x51d593
mov dword [esp + 0xc], edx
mov edx, dword [ebx + 0x280]
mov edi, dword [esp]
cmp dword [edx + 0x15c], edi
jbe 0x51d452
lea edx, [edi + edi*2]
mov edi, dword [ebp + 8]
lea ecx, [ecx + edx*2 + 0xc]
mov edx, dword [edi + 0x88]
cmp ecx, edx
jb 0x51d0da
push 0x84eecc
call fcn.007c1be0
mov esi, edx
cmp edx, dword [esp + 0x20]
jb 0x51d303
mov eax, dword [esp + 8]
mov ecx, edi
and ecx, 0x7ffffff
movzx eax, byte [eax + 0x25f]
shl eax, 0x10
add eax, 0x10001
mov edx, eax
shr edx, 0x10
add ecx, edx
mov edx, dword [ebx + 0x7c]
cmp ecx, edx
jae 0x51d713
mov edx, dword [ebx + 0x78]
mov ebx, dword [edx + ecx*4]
test ebx, ebx
js 0x51d5b5
mov edi, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
test ebx, 0x8000000
je 0x51d6a3
mov ecx, dword [esp + 8]
xor edi, edi
mov edx, 1
mov eax, dword [ecx + 0x280]
cmp dword [eax + 0x15c], 1
jne 0x51d4a5
mov eax, dword [esp + 0x20]
mov dword [esp + 4], eax
jmp 0x51d6a3
mov ecx, dword [ebx + 0x284]
mov edi, dword [ebp + 8]
mov edx, 1
and ecx, 0x1f
shl edx, cl
cmp ecx, 0x1b
jae 0x51d781
or edx, 0x40000000
test edx, edx
jns 0x51d0eb
movzx eax, al
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], edi
lea ecx, [esp + 0x28]
lea edx, [esp + 0x30]
push eax
push dword [esp + 4]
push dword [esp + 0x14]
call fcn.007c9a60
add esp, 0xc
jmp 0x51d0f7
mov eax, dword [ebp + 8]
movzx ecx, byte [ecx + 0x284]
and ebx, 0x7ffffff
mov edx, dword [eax + 0x94]
shr ebx, cl
cmp ebx, edx
jae 0x51d6f9
mov eax, dword [eax + 0x90]
mov edx, dword [eax + ebx*8 + 4]
test edx, edx
je 0x51d705
mov eax, dword [eax + ebx*8]
test byte [eax + 8], 2
jne 0x51d521
mov eax, dword [esp + 0x20]
jmp 0x51d674
xor eax, eax
cmp dword [esp + 0x10], 0
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
sete al
cmove edx, esi
mov dword [ecx], eax
mov dword [ecx + 4], edx
jmp 0x51d6b6
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov dword [eax], 0
mov dword [eax + 4], ecx
mov dword [eax + 8], esi
jmp 0x51d6bd
mov ecx, dword [esp + 0x20]
cmp edx, 0xd
jb 0x51d7ab
add edx, 0xfffffff3
cmp edx, 3
ja 0x51d697
mov ecx, 4
push 0x8516a4
call fcn.007c1c40
mov ecx, dword [esp + 8]
shl eax, 8
mov edx, edi
mov dword [esp + 0x30], ecx
mov ecx, dword [ebp + 8]
mov dword [esp + 0x34], ecx
lea ecx, [esp + 0x30]
push eax
call fcn.007c8760
add esp, 4
test eax, eax
je 0x51d605
movzx eax, byte [0x94bfc5]
xor ecx, ecx
mov edx, 0xc
call fcn.0071ee80
mov ecx, dword [esp]
test eax, eax
je 0x51d5f6
mov esi, dword [esp + 0x18]
mov byte [eax], 1
mov dword [eax + 4], ecx
push eax
push 0
push dword [0x94bf18]
mov edi, ecx
call dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esi + 4], edi
mov dword [esi], 2
jmp 0x51d6bd
mov ecx, dword [esp + 8]
mov edx, edi
mov dword [esp + 0x30], ecx
mov ecx, dword [ebp + 8]
mov dword [esp + 0x34], ecx
lea ecx, [esp + 0x30]
push eax
call fcn.007c8760
add esp, 4
test eax, eax
je 0x51d6c5
movzx eax, byte [0x94bfc5]
xor ecx, ecx
mov edx, 0xc
call fcn.0071ee80
mov ecx, dword [esp + 0x20]
test eax, eax
jne 0x51d58c
mov ecx, 4
mov edx, 0xc
call fcn.007c1490
mov ebx, edx
test ebx, 0x8000000
je 0x51d34f
mov ecx, dword [esp + 8]
xor edi, edi
mov edx, 1
mov eax, dword [ecx + 0x280]
cmp dword [eax + 0x15c], 1
jne 0x51d636
mov eax, dword [esp]
mov dword [esp + 4], eax
jmp 0x51d6a3
mov eax, dword [ebp + 8]
movzx ecx, byte [ecx + 0x284]
and ebx, 0x7ffffff
mov edx, dword [eax + 0x94]
shr ebx, cl
cmp ebx, edx
jae 0x51d6f9
mov eax, dword [eax + 0x90]
mov edx, dword [eax + ebx*8 + 4]
test edx, edx
je 0x51d705
mov eax, dword [eax + ebx*8]
test byte [eax + 8], 2
jne 0x51d67f
mov eax, dword [esp]
mov dword [esp + 4], eax
mov edx, 1
jmp 0x51d6a3
cmp edx, 0xd
jb 0x51d7ab
mov ecx, dword [esp]
add edx, 0xfffffff3
cmp edx, 3
jbe 0x51d53a
mov edi, dword [eax + 0x15]
mov edx, 1
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x18]
xor eax, eax
test edx, edx
sete al
cmove edi, esi
mov dword [ecx], eax
mov dword [ecx + 4], edi
mov eax, dword [esp + 4]
mov dword [ecx + 8], eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebx, edx
mov edi, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
test ebx, 0x8000000
jne 0x51d42b
jmp 0x51d6a3
push 0x84eba0
call fcn.007c1be0
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x20]
push 0x84f54c
call fcn.007c1be0
mov ecx, ebx
push 0x84eedc
call fcn.007c1be0
xor ecx, ecx
xor edx, edx
push 0x851760
call fcn.007c1be0
push 0x84ebb0
call fcn.007c1be0
lea eax, [esp + 0x50]
lea ecx, [esp + 0x30]
mov edx, 0x84f2dc
mov dword [esp + 0x30], 0x84f264
mov dword [esp + 0x34], 1
mov dword [esp + 0x40], 0
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], 1
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 0x4dccb0
call fcn.007c1b50
mov ecx, 0xd
mov edx, eax
push 0x851790
call fcn.007c1b80
mov ecx, 4
mov edx, eax
push 0x8516a4
call fcn.007c1c40
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], 0
lea eax, [esp + 0x30]
mov ecx, 0x93b384
mov edx, 0x2b
push 0x84eeec
push 0x84df38
push eax
call fcn.007c1f60
mov ecx, 0xd
push 0x851790
call fcn.007c1b80
int3