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

Disassembly:
sub esp, 0x80
push ebx
mov ebx, dword [esp + 0x94]
xor eax, eax
cmp dword [esp + 0x98], 0x5d4
push ebp
push esi
push edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x2c], eax
jb 0x50de35
push dword [esp + 0xa8]
lea eax, [ebx + 0x68]
push 0x36c
push eax
push dword [esp + 0xa8]
lea eax, [esp + 0x2c]
push dword [esp + 0xa8]
lea edi, [ebx + 0x4d4]
push eax
lea eax, [esp + 0x44]
push eax
push ebx
push pe_nt_image_headers32
push edi
call fcn.0050a6cd
add esp, 0x28
mov dword [esp + 0x54], eax
cmp eax, 0xffffff88
ja 0x50de38
mov ebp, dword [esp + 0x94]
push ebp
call fcn.0050707e
push 0xb
movzx esi, al
mov dword [esp + 0x1c], eax
inc esi
pop eax
cmp esi, eax
cmovb eax, esi
push eax
push dword [esp + 0x24]
push dword [esp + 0x38]
push ebx
push edi
call fcn.0050e085
add esp, 0x18
mov dword [esp + 0x1c], eax
cmp eax, esi
ja 0x50de35
mov byte [esp + 0x16], al
xor ecx, ecx
push 4
lea eax, [esp + 0x18]
mov byte [esp + 0x19], cl
push eax
push ebp
call fcn.005282a0
mov eax, dword [esp + 0x28]
xor ecx, ecx
mov esi, dword [esp + 0x38]
add esp, 0xc
inc eax
mov ebp, ecx
mov edx, ecx
test eax, eax
jle 0x50da37
mov edi, eax
mov eax, ebp
add ebp, dword [ebx + edx*4]
mov dword [ebx + edx*4 + 0x34], eax
inc edx
cmp edx, edi
jl 0x50da23
lea edi, [ebx + 0x4d4]
lea ebp, [esi - 3]
mov edx, ecx
mov dword [esp + 0x10], edx
test ebp, ebp
jle 0x50da8a
mov eax, ecx
lea esi, [edi + edx]
mov dword [esp + 0x24], eax
movzx edx, byte [esi]
mov cl, byte [esp + 0x10]
add cl, al
mov eax, dword [ebx + edx*4 + 0x34]
mov byte [eax + ebx + 0x3d4], cl
inc dword [ebx + edx*4 + 0x34]
mov eax, dword [esp + 0x24]
inc eax
inc esi
mov dword [esp + 0x24], eax
cmp eax, 4
jl 0x50da4d
mov edx, dword [esp + 0x10]
add edx, 4
mov dword [esp + 0x10], edx
push 0
pop ecx
cmp edx, ebp
jl 0x50da44
mov esi, dword [esp + 0x2c]
cmp edx, esi
jge 0x50dab0
lea esi, [ebx + 0x4d4]
add esi, edx
movzx ecx, byte [esi]
mov eax, dword [ebx + ecx*4 + 0x34]
mov byte [eax + ebx + 0x3d4], dl
inc dword [ebx + ecx*4 + 0x34]
inc edx
inc esi
cmp edx, dword [esp + 0x2c]
jl 0x50da96
mov eax, dword [esp + 0x1c]
xor ecx, ecx
mov edi, dword [ebx]
inc ecx
inc eax
mov dword [esp + 0x10], edi
mov dword [esp + 0x24], ecx
cmp eax, ecx
jbe 0x50de2f
mov ebp, dword [ebx + ecx*4]
xor esi, esi
inc esi
mov dword [esp + 0x48], ebp
shl esi, cl
mov cl, byte [esp + 0x1c]
sub cl, byte [esp + 0x24]
sar esi, 1
inc cl
mov eax, esi
mov dword [esp + 0x4c], esi
sub eax, 1
je 0x50ddcb
sub eax, 1
je 0x50dd8b
dec eax
sub eax, 1
je 0x50dcfa
sub eax, 4
je 0x50dc41
test ebp, ebp
jle 0x50de0c
movzx eax, cl
mov ecx, dword [esp + 0x18]
cdq
add ecx, 0xa
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0x30], edx
lea ecx, [eax + ecx*2]
mov dword [esp + 0x40], ecx
lea ecx, [ebx + 0x3d4]
mov ebx, dword [esp + 0x40]
add ecx, edi
mov edi, ebp
mov dword [esp + 0x44], ecx
mov dword [esp + 0x20], edi
mov ebp, ecx
movzx eax, byte [ebp]
mov ecx, 0x10001
cdq
shld edx, eax, 8
push ecx
shl eax, 8
add eax, dword [esp + 0x54]
push ecx
adc edx, dword [esp + 0x38]
push edx
push eax
call fcn.00527930
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edx
test esi, esi
jle 0x50dc1b
lea edi, [esi - 1]
mov dword [esp + 0x34], ebx
shr edi, 4
mov esi, ebx
inc edi
mov ebp, eax
mov ebx, edx
push 8
lea eax, [esp + 0x5c]
mov dword [esp + 0x5c], ebp
push eax
lea eax, [esi - 0x10]
mov dword [esp + 0x64], ebx
push eax
call fcn.005282a0
push 8
lea eax, [esp + 0x70]
mov dword [esp + 0x70], ebp
push eax
lea eax, [esi - 8]
mov dword [esp + 0x78], ebx
push eax
call fcn.005282a0
push 8
lea eax, [esp + 0x84]
mov dword [esp + 0x84], ebp
push eax
push esi
mov dword [esp + 0x90], ebx
call fcn.005282a0
push 8
lea eax, [esp + 0x98]
mov dword [esp + 0x98], ebp
push eax
lea eax, [esi + 8]
mov dword [esp + 0xa0], ebx
push eax
call fcn.005282a0
add esp, 0x30
add esi, 0x20
sub edi, 1
jne 0x50db91
mov esi, dword [esp + 0x4c]
mov ebx, dword [esp + 0x40]
mov ebp, dword [esp + 0x44]
mov edi, dword [esp + 0x20]
inc ebp
lea ebx, [ebx + esi*2]
sub edi, 1
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebp
mov dword [esp + 0x20], edi
jne 0x50db4e
mov ebp, dword [esp + 0x48]
mov edi, dword [esp + 0x10]
jmp 0x50de05
test ebp, ebp
jle 0x50de0c
movzx eax, cl
mov ecx, dword [esp + 0x18]
cdq
add ecx, 2
mov esi, eax
mov dword [esp + 0x20], ebp
mov eax, dword [esp + 0x94]
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], edx
lea ecx, [eax + ecx*2]
mov dword [esp + 0x3c], ecx
lea ecx, [ebx + 0x3d4]
mov ebx, dword [esp + 0x3c]
add ecx, edi
mov dword [esp + 0x38], ecx
mov ebp, ecx
movzx eax, byte [ebp]
mov ecx, 0x10001
cdq
shld edx, eax, 8
push ecx
shl eax, 8
add eax, esi
push ecx
adc edx, dword [esp + 0x3c]
push edx
push eax
call fcn.00527930
mov esi, eax
mov edi, edx
push 8
lea eax, [esp + 0x7c]
mov dword [esp + 0x7c], esi
push eax
push ebx
mov dword [esp + 0x88], edi
call fcn.005282a0
push 8
lea eax, [esp + 0x90]
mov dword [esp + 0x90], esi
push eax
lea eax, [ebx + 8]
mov dword [esp + 0x98], edi
push eax
call fcn.005282a0
mov esi, dword [esp + 0x48]
add esp, 0x18
add ebx, 0x10
inc ebp
sub dword [esp + 0x20], 1
jne 0x50dc82
mov esi, dword [esp + 0x4c]
jmp 0x50dc34
test ebp, ebp
jle 0x50de0c
movzx eax, cl
mov ecx, dword [esp + 0x18]
cdq
add ecx, 2
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x94]
mov esi, dword [esp + 0x30]
mov dword [esp + 0x50], edx
mov dword [esp + 0x34], ebp
lea ecx, [eax + ecx*2]
mov dword [esp + 0x3c], ecx
lea ecx, [ebx + 0x3d4]
mov ebx, dword [esp + 0x3c]
add ecx, edi
mov dword [esp + 0x38], ecx
mov edi, ecx
movzx eax, byte [edi]
mov ecx, 0x10001
cdq
shld edx, eax, 8
push ecx
shl eax, 8
add eax, esi
push ecx
adc edx, dword [esp + 0x58]
push edx
push eax
call fcn.00527930
mov dword [esp + 0x88], eax
lea eax, [esp + 0x88]
push 8
push eax
push ebx
mov dword [esp + 0x98], edx
call fcn.005282a0
add esp, 0xc
add ebx, 8
inc edi
sub ebp, 1
jne 0x50dd3d
jmp 0x50dcf1
test ebp, ebp
jle 0x50de0c
mov eax, dword [esp + 0x94]
lea edx, [ebx + 0x3d4]
mov byte [esp + 0x28], cl
mov ebx, ebp
mov ecx, dword [esp + 0x18]
add ecx, 2
add edx, edi
lea ecx, [eax + ecx*2]
mov al, byte [edx]
inc edx
mov byte [esp + 0x29], al
mov ax, word [esp + 0x28]
mov word [ecx], ax
lea ecx, [ecx + 4]
mov word [ecx - 2], ax
sub ebx, 1
jne 0x50ddae
jmp 0x50de05
test ebp, ebp
jle 0x50de0c
mov eax, dword [esp + 0x94]
lea edx, [ebx + 0x3d4]
mov byte [esp + 0x14], cl
mov ebx, ebp
mov ecx, dword [esp + 0x18]
add ecx, 2
add edx, edi
lea ecx, [eax + ecx*2]
mov al, byte [edx]
inc edx
mov byte [esp + 0x15], al
mov ax, word [esp + 0x14]
mov word [ecx], ax
lea ecx, [ecx + 2]
sub ebx, 1
jne 0x50ddee
mov ebx, dword [esp + 0xa0]
mov ecx, dword [esp + 0x24]
add edi, ebp
mov eax, dword [esp + 0x1c]
imul esi, ebp
mov dword [esp + 0x10], edi
add dword [esp + 0x18], esi
inc ecx
inc eax
mov dword [esp + 0x24], ecx
cmp ecx, eax
jb 0x50daca
mov eax, dword [esp + 0x54]
jmp 0x50de38
push 0xffffffffffffffd4
pop eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x80
ret