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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x5c
mov edi, ecx
mov ecx, dword [esp + 0x78]
mov eax, dword [esp + 0x74]
mov ebx, dword [esp + 0x70]
test edx, edx
mov dword [esp + 0x38], edx
je 0x51bb2a
lea ebp, [edx - 1]
mov esi, SysReAllocString
mov dword [esp + 0x34], eax
cmp ebp, 0x7fffffff
cmovae ebp, esi
add ecx, ebp
cmovo ecx, esi
xor ebp, ebp
add eax, edx
jb 0x51c37f
sub eax, ebp
jb 0x51c37f
inc ecx
jo 0x51c37f
cmp eax, 0x72
mov esi, 0x72
mov edx, ecx
movss dword [esp + 0x48], xmm0
cmovb esi, eax
sub edx, esi
mov dword [esp + 0x20], edx
jo 0x51c37f
mov eax, esp
push eax
call fcn.00526250
add esp, 4
mov eax, dword [esp + 0x38]
xor ecx, ecx
xor ebp, ebp
lea esi, [edi + eax]
mov eax, dword [esp + 0x34]
mov dword [esp + 0x24], esi
add eax, ebx
mov dword [esp + 0x4c], eax
xor eax, eax
jmp 0x51bbef
xor ebp, ebp
test eax, eax
je 0x51bb47
cmp byte [ebx + ebp], 0x30
jne 0x51bb3f
inc ebp
cmp eax, ebp
jne 0x51bb30
mov ebp, eax
jmp 0x51bb47
cmp ebp, eax
ja 0x51c37f
cmp ebp, 0x7fffffff
mov esi, SysReAllocString
cmovb esi, ebp
xor edx, edx
cmp ecx, esi
setns dl
add edx, 0x7fffffff
sub ecx, esi
mov esi, eax
cmovo ecx, edx
sub esi, ebp
add ebx, ebp
mov edx, SysReAllocStringLen
dec ecx
mov dword [esp + 0x34], esi
cmovno edx, ecx
mov ecx, edx
mov edx, dword [esp + 0x38]
add eax, edx
jae 0x51bad1
jmp 0x51c37f
cmp dword [esp], 0
jne 0x51bb9e
mov ecx, esp
call fcn.0051d070
mov esi, dword [esp + 4]
mov eax, dword [esp + 0x14]
mov ebx, 1
mov dword [esi], eax
mov esi, dword [esp + 0x24]
mov dword [esp + 8], ebx
xor ecx, ecx
xor eax, eax
mov ebx, dword [esp + 0xc]
mov edx, 0xa
mul edx
jo 0x51c37f
add edi, 0xffffffd0
cmp edi, 0xa
jae 0x51c37f
add eax, edi
jb 0x51c37f
inc ecx
je 0x51c37f
mov edi, dword [esp + 0x18]
inc ebp
cmp ebp, 0x71
je 0x51bd1b
test edi, edi
sete dh
cmp edi, esi
sete dl
or dl, dh
cmp dl, 1
jne 0x51bc30
test ebx, ebx
je 0x51bd12
cmp ebx, dword [esp + 0x4c]
je 0x51bd12
lea edx, [ebx + 1]
mov edi, ebx
mov dword [esp + 0x18], 0
mov ebx, edx
jmp 0x51bc37
lea edx, [edi + 1]
mov dword [esp + 0x18], edx
movzx edi, byte [edi]
cmp ecx, 8
jne 0x51bbb9
mov dword [esp + 0xc], ebx
mov ebx, dword [esp + 8]
mov esi, dword [esp + 4]
mov dword [esp + 0x14], eax
test ebx, ebx
je 0x51bb8d
mov dword [esp + 0x1c], edi
mov dword [esp + 0x10], ebp
lea ecx, [ebx*4]
xor edi, edi
xor ebp, ebp
nop
mov eax, 0x5f5e100
mul dword [esi + edi]
add eax, ebp
mov ebp, edx
adc ebp, 0
mov dword [esi + edi], eax
add edi, 4
cmp ecx, edi
jne 0x51bc70
test ebp, ebp
je 0x51bce5
cmp ebx, dword [esp]
mov edi, dword [esp + 0x1c]
jne 0x51bca1
mov ecx, esp
call fcn.0051d070
mov esi, dword [esp + 4]
mov dword [esi + ebx*4], ebp
inc ebx
je 0x51c37f
mov ebp, dword [esp + 0x10]
mov dword [esp + 8], ebx
mov eax, dword [esp + 0x14]
xor ecx, ecx
add dword [esi], eax
jae 0x51bcdc
mov eax, 1
nop word cs:[eax + eax]
nop dword [eax]
cmp ebx, eax
je 0x51bcef
inc dword [esi + eax*4]
lea eax, [eax + 1]
je 0x51bcd0
mov esi, dword [esp + 0x24]
jmp 0x51bbb3
mov ebp, dword [esp + 0x10]
mov edi, dword [esp + 0x1c]
jmp 0x51bcb3
cmp ebx, dword [esp]
jne 0x51bcff
mov ecx, esp
call fcn.0051d070
mov esi, dword [esp + 4]
mov dword [esi + ebx*4], 1
inc ebx
jne 0x51bba9
jmp 0x51c37f
test ecx, ecx
jne 0x51bd20
jmp 0x51bdec
mov ebp, 0x71
cmp ecx, 0xa
mov dword [esp + 0x14], eax
jae 0x51c37f
mov eax, dword [esp + 8]
mov esi, dword [esp + 4]
test eax, eax
je 0x51bdcc
mov ecx, dword [ecx*4 + 0x7a2464]
mov dword [esp + 0x10], ebp
lea ebp, [eax*4]
xor edi, edi
xor ebx, ebx
mov dword [esp + 0x18], eax
nop word [eax + eax]
mov eax, ecx
mul dword [esi + edi]
add eax, ebx
mov ebx, edx
adc ebx, 0
mov dword [esi + edi], eax
add edi, 4
cmp ebp, edi
jne 0x51bd60
test ebx, ebx
je 0x51bdc2
mov edi, dword [esp + 0x18]
mov ebp, dword [esp + 0x10]
cmp edi, dword [esp]
jne 0x51bd92
mov ecx, esp
call fcn.0051d070
mov esi, dword [esp + 4]
mov dword [esi + edi*4], ebx
inc edi
je 0x51c37f
mov dword [esp + 8], edi
mov eax, dword [esp + 0x14]
add dword [esi], eax
jae 0x51bdec
mov eax, 1
nop dword [eax]
cmp edi, eax
je 0x51c684
inc dword [esi + eax*4]
lea eax, [eax + 1]
je 0x51bdb0
jmp 0x51bdec
mov ebp, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
jmp 0x51bda0
cmp dword [esp], 0
jne 0x51bddd
mov ecx, esp
call fcn.0051d070
mov esi, dword [esp + 4]
mov eax, dword [esp + 0x14]
mov ecx, 1
mov dword [esi], eax
mov dword [esp + 8], ecx
mov eax, dword [esp + 0x38]
add eax, dword [esp + 0x34]
jb 0x51c37f
cmp ebp, eax
jae 0x51bea2
mov esi, dword [esp + 8]
mov ecx, dword [esp + 4]
test esi, esi
je 0x51be82
lea ebx, [esi*4]
xor ebp, ebp
xor edi, edi
nop dword [eax]
mov eax, 0xa
mul dword [ecx + ebp]
add eax, edi
mov edi, edx
adc edi, 0
mov dword [ecx + ebp], eax
add ebp, 4
cmp ebx, ebp
jne 0x51be20
test edi, edi
je 0x51be5b
cmp esi, dword [esp]
jne 0x51be4d
mov ecx, esp
call fcn.0051d070
mov ecx, dword [esp + 4]
mov dword [ecx + esi*4], edi
inc esi
je 0x51c37f
mov dword [esp + 8], esi
inc dword [ecx]
jne 0x51bea2
mov eax, 1
nop word cs:[eax + eax]
nop
cmp esi, eax
je 0x51c6bc
inc dword [ecx + eax*4]
lea eax, [eax + 1]
je 0x51be70
jmp 0x51bea2
cmp dword [esp], 0
jne 0x51be93
mov ecx, esp
call fcn.0051d070
mov ecx, dword [esp + 4]
mov eax, 1
mov dword [ecx], 1
mov dword [esp + 8], eax
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 8]
movsd xmm0, qword [esp]
test ecx, ecx
mov dword [esp + 0x58], eax
movsd qword [esp + 0x50], xmm0
js 0x51c393
mov eax, dword [esp + 0x58]
movsd xmm0, qword [esp + 0x50]
mov dword [esp + 8], eax
movsd qword [esp], xmm0
push ecx
lea eax, [esp + 4]
push eax
call fcn.00526320
mov eax, dword [esp + 0x28]
add esp, 8
mov edi, eax
and edi, 0x1f
je 0x51bf74
mov ecx, dword [esp + 8]
mov esi, dword [esp + 4]
mov edx, 0x20
sub edx, edi
test ecx, ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], esi
je 0x51c67d
lea ebp, [ecx*4]
xor ebx, ebx
mov dword [esp + 0x18], edi
nop dword [eax]
mov eax, dword [esi]
mov ecx, dword [esp + 0x18]
mov edi, eax
shl edi, cl
mov ecx, edx
shr ebx, cl
or ebx, edi
mov edi, eax
add ebp, 0xfffffffc
mov dword [esi], ebx
lea esi, [esi + 4]
mov ebx, eax
jne 0x51bf20
mov eax, dword [esp + 0x20]
mov ecx, edx
shr edi, cl
test edi, edi
je 0x51bf74
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0xc]
cmp esi, dword [esp]
jne 0x51bf66
mov ecx, esp
call fcn.0051d070
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 4]
mov dword [ecx + esi*4], edi
inc esi
je 0x51c37f
mov dword [esp + 8], esi
cmp eax, 0x20
jb 0x51bf85
shr eax, 5
mov ecx, esp
mov edx, eax
call fcn.0051a420
mov ebp, dword [esp + 8]
mov edx, dword [esp + 4]
test ebp, ebp
mov dword [esp + 0x18], edx
je 0x51c6ab
cmp ebp, 1
je 0x51c086
cmp ebp, 2
je 0x51c046
mov ebx, dword [edx + ebp*4 - 4]
mov eax, 0x3f
bsr ecx, ebx
cmovne eax, ecx
xor eax, 0x1f
add eax, 0x20
cmp eax, 0x40
jae 0x51c37f
mov edi, dword [edx + ebp*4 - 0xc]
mov esi, dword [edx + ebp*4 - 8]
mov ecx, eax
mov edx, edi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], edi
shld esi, edi, cl
xor edi, edi
shl edx, cl
test al, 0x20
mov cl, 1
cmovne esi, edx
cmovne edx, edi
mov dword [esp + 0x14], ecx
or edx, esi
je 0x51c2a7
mov edx, dword [esp + 0xc]
mov esi, dword [esp + 0x10]
mov ecx, eax
neg cl
shrd edx, esi, cl
shr esi, cl
test cl, 0x20
mov ecx, eax
cmovne edx, esi
cmovne esi, edi
mov dword [esp + 0xc], edx
xor edx, edx
shld edx, ebx, cl
shl ebx, cl
test al, 0x20
cmovne edx, ebx
cmovne ebx, edi
or ebx, dword [esp + 0xc]
or edx, esi
test ebp, ebp
je 0x51c0be
mov edi, 0xffffffff
cmp ebp, 0x7ffffff
ja 0x51c0be
jmp 0x51c0a1
mov ebx, dword [edx]
mov edx, dword [edx + 4]
mov eax, ebx
or eax, edx
je 0x51c37f
bsr ecx, ebx
bsr eax, edx
mov dword [esp + 0x14], 0
xor ecx, 0x1f
xor eax, 0x1f
add cl, 0x20
test edx, edx
movzx ecx, cl
cmovne ecx, eax
xor eax, eax
shld edx, ebx, cl
shl ebx, cl
test cl, 0x20
cmovne edx, ebx
cmovne ebx, eax
jmp 0x51c0a1
mov edx, dword [edx]
test edx, edx
je 0x51c37f
bsr ecx, edx
mov dword [esp + 0x14], 0
xor ebx, ebx
not ecx
shl edx, cl
mov eax, dword [esp + 0x18]
mov eax, dword [eax + ebp*4 - 4]
test eax, eax
je 0x51c29d
bsr eax, eax
xor eax, 0x1f
shl ebp, 5
sub ebp, eax
mov edi, ebp
add edi, 0xffffffc0
jo 0x51c37f
bsr ecx, ebx
bsr eax, edx
mov esi, ebx
xor ecx, 0x1f
xor eax, 0x1f
add ecx, 0x20
test edx, edx
cmovne ecx, eax
xor eax, eax
or esi, edx
cmove ecx, eax
shld edx, ebx, cl
shl ebx, cl
test cl, 0x20
cmovne edx, ebx
cmovne ebx, eax
sub edi, ecx
jo 0x51c37f
mov eax, edi
add eax, 0x28
jo 0x51c37f
cmp eax, 0xffffff6b
jge 0x51c189
mov ecx, 0xffffff6b
sub ecx, edi
jo 0x51c37f
xor eax, eax
cmp ecx, 0x41
jge 0x51c278
cmp ecx, 0x40
jne 0x51c2ee
mov eax, ecx
mov ecx, ebx
neg ecx
mov ecx, SysReAllocStringLen
sbb ecx, edx
setb cl
add edx, 0x80000000
or edx, ebx
mov dword [esp + 0xc], ecx
sete ch
xor ebx, ebx
xor edx, edx
add edi, eax
jo 0x51c37f
mov eax, dword [esp + 0x14]
and al, ch
or al, byte [esp + 0xc]
test al, 1
jne 0x51c173
test bl, 1
sete al
xor ch, 1
or ch, al
jne 0x51c17f
add ebx, 1
adc edx, 0
jb 0x51c37f
test ebx, 0x1000000
je 0x51c1fd
jmp 0x51c1f0
mov esi, ebx
movzx ecx, dl
neg esi
mov esi, 0x80
sbb esi, ecx
mov esi, edx
setb byte [esp + 0xc]
xor ecx, 0x80
or ecx, ebx
mov ecx, edx
mov edx, dword [esp + 0x14]
sete byte [esp + 0x10]
and esi, 0x1ff
shr ecx, 8
xor esi, 0x180
and dl, byte [esp + 0x10]
or esi, ebx
sete bl
or bl, byte [esp + 0xc]
or bl, dl
xor edx, edx
cmp ecx, 0xffffff
sete bh
test bl, bh
jne 0x51c1e9
movzx esi, bl
mov edi, eax
add ecx, esi
mov ebx, ecx
jmp 0x51c1fd
mov ebx, 0x1000000
mov edi, eax
inc edi
jo 0x51c37f
shrd ebx, edx, 1
shr edx, 1
lea eax, [edi - 0x69]
cmp eax, 0x17
ja 0x51c237
lea eax, [edi - 0x68]
mov cl, 0x18
mov esi, 0xffffffff
xor ebp, ebp
sub cl, al
shl esi, cl
test cl, 0x20
mov ecx, 0xffffffff
cmovne ecx, esi
cmovne esi, ebp
xor esi, 0xff000000
not ecx
and ecx, edx
and esi, ebx
or esi, ecx
je 0x51c6e3
xor eax, eax
or edx, ebx
je 0x51c278
cmp edi, 0xffffff6b
jl 0x51c278
mov eax, 0x7f800000
cmp edi, 0x68
jg 0x51c278
mov eax, edi
mov ecx, ebx
shl edi, 0x17
xor edx, edx
xor eax, 0xffffff6b
and ecx, 0x800000
add edi, 0x4b000000
or ecx, eax
cmovne edx, edi
and ebx, 0x7fffff
or ebx, edx
mov eax, ebx
mov ecx, dword [esp]
test ecx, ecx
je 0x51c295
shl ecx, 2
push 4
push ecx
push dword [esp + 0x20]
mov esi, eax
call fcn.0049ce00
mov eax, esi
add esp, 0xc
add esp, 0x5c
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, 0x20
jmp 0x51c0b7
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0xc]
lea ecx, [ebp*4]
nop word cs:[eax + eax]
cmp ecx, 0xc
je 0x51c2d1
cmp dword [edx + ecx - 0x10], 0
lea ecx, [ecx - 4]
je 0x51c2c0
jmp 0x51c2d9
mov dword [esp + 0x14], 0
mov edx, esi
jmp 0x51bffe
mov eax, ecx
mov ch, 1
mov dword [esp + 0xc], 0
jmp 0x51c36b
jae 0x51c37f
xor ebp, ebp
test ecx, ecx
je 0x51c2e0
mov esi, 0xffffffff
mov dword [esp + 0x1c], ecx
mov eax, 0xffffffff
mov dword [esp + 0x10], 0
shl esi, cl
test cl, 0x20
mov ecx, dword [esp + 0x1c]
cmovne eax, esi
cmovne esi, ebp
dec cl
mov ebp, 1
shld dword [esp + 0x10], ebp, cl
shl ebp, cl
test cl, 0x20
not esi
not eax
mov ecx, dword [esp + 0x10]
cmovne ecx, ebp
mov dword [esp + 0x10], ecx
mov ecx, 0
cmovne ebp, ecx
mov ecx, dword [esp + 0x10]
and esi, ebx
and eax, edx
cmp ebp, esi
sbb ecx, eax
setb cl
xor eax, dword [esp + 0x10]
xor esi, ebp
xor ebp, ebp
mov dword [esp + 0xc], ecx
or esi, eax
mov eax, dword [esp + 0x1c]
sete ch
mov cl, al
shrd ebx, edx, cl
shr edx, cl
test al, 0x20
cmovne ebx, edx
cmovne edx, ebp
jmp 0x51c150
ud2
mov ecx, esp
push 2
call fcn.0071b540
add esp, 4
mov edx, dword [esp + 8]
jmp 0x51c3fc
movd xmm1, dword [esp + 0x48]
mov eax, dword [esp + 0x58]
movsd xmm0, qword [esp + 0x50]
mov edi, 0xffffff6a
movd edx, xmm1
mov dword [esp + 0x44], eax
movsd qword [esp + 0x3c], xmm0
mov eax, edx
mov dword [esp + 0x14], edx
add edx, edx
and eax, 0x7f800000
and edx, 0xfffffe
mov ecx, eax
lea esi, [edx + 0x1000000]
shr ecx, 0x17
add ecx, 0xffffff69
test eax, eax
mov eax, esp
cmove esi, edx
cmovne edi, ecx
inc esi
push eax
call fcn.00526250
add esp, 4
mov eax, dword [esp]
mov edx, dword [esp + 8]
sub eax, edx
cmp eax, 2
jb 0x51c381
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0x20]
mov dword [eax + edx*4], esi
mov dword [eax + edx*4 + 4], 0
add edx, 2
jb 0x51c37f
cmp dword [eax + edx*4 - 4], 0
jne 0x51c450
dec edx
mov ecx, edx
nop word cs:[eax + eax]
nop dword [eax]
sub ecx, 1
jb 0x51c44a
cmp dword [eax + edx*4 - 4], 0
mov edx, ecx
je 0x51c430
inc ecx
mov edx, ecx
jmp 0x51c44c
xor eax, eax
jmp 0x51c4de
xor edx, edx
mov ecx, dword [esp + 0x20]
movsd xmm0, qword [esp]
sub edi, ecx
mov dword [esp + 0x30], edx
movsd qword [esp + 0x28], xmm0
jo 0x51c37f
neg ecx
jo 0x51c37f
lea esi, [esp + 0x28]
push ecx
push esi
call fcn.00526320
add esp, 8
test edi, edi
jle 0x51c5c6
mov eax, edi
and eax, 0x1f
je 0x51c51b
mov ecx, dword [esp + 0x30]
mov ebp, dword [esp + 0x2c]
mov edx, 0x20
mov dword [esp + 0xc], edi
sub edx, eax
mov dword [esp + 0x18], edx
test ecx, ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], ebp
je 0x51c443
lea edi, [ecx*4]
xor ebx, ebx
mov edx, eax
nop
mov eax, dword [ebp]
mov ecx, edx
mov esi, eax
shl esi, cl
mov ecx, dword [esp + 0x18]
shr ebx, cl
or ebx, esi
add edi, 0xfffffffc
mov dword [ebp], ebx
lea ebp, [ebp + 4]
mov ebx, eax
jne 0x51c4c0
mov edi, dword [esp + 0xc]
mov ecx, dword [esp + 0x18]
shr eax, cl
lea esi, [esp + 0x28]
test eax, eax
je 0x51c51b
mov ebx, dword [esp + 0x10]
mov ebp, eax
mov eax, dword [esp + 0x1c]
cmp ebx, dword [esp + 0x28]
jne 0x51c50d
lea ecx, [esp + 0x28]
call fcn.0051d070
mov eax, dword [esp + 0x2c]
mov dword [eax + ebx*4], ebp
inc ebx
je 0x51c37f
mov dword [esp + 0x30], ebx
cmp edi, 0x20
jb 0x51c52c
shr edi, 5
mov ecx, esi
mov edx, edi
call fcn.0051a420
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x30]
mov esi, dword [esp + 0x40]
mov eax, dword [esp + 0x2c]
cmp ecx, edx
ja 0x51c585
jb 0x51c58f
shl ecx, 2
shl edx, 2
nop dword [eax + eax]
test ecx, ecx
je 0x51c570
test edx, edx
je 0x51c570
mov edi, dword [esi + ecx - 4]
mov ebx, dword [eax + edx - 4]
cmp edi, ebx
ja 0x51c585
add ecx, 0xfffffffc
add edx, 0xfffffffc
cmp edi, ebx
jae 0x51c550
jmp 0x51c58f
mov ecx, dword [esp + 0x14]
test cl, 1
je 0x51c58f
inc ecx
mov dword [esp + 0x14], ecx
jne 0x51c58f
jmp 0x51c37f
inc dword [esp + 0x14]
je 0x51c37f
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x51c5a6
shl ecx, 2
push 4
push ecx
push eax
call fcn.0049ce00
add esp, 0xc
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x51c5bd
shl eax, 2
push 4
push eax
push esi
call fcn.0049ce00
add esp, 0xc
mov eax, dword [esp + 0x14]
jmp 0x51c295
jns 0x51c52c
neg edi
jo 0x51c37f
mov eax, edi
and eax, 0x1f
je 0x51c667
mov ecx, dword [esp + 0x44]
mov ebp, dword [esp + 0x40]
mov edx, 0x20
mov dword [esp + 0xc], edi
sub edx, eax
mov dword [esp + 0x18], edx
test ecx, ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], ebp
je 0x51c679
lea edi, [ecx*4]
xor ebx, ebx
mov edx, eax
nop dword [eax]
mov eax, dword [ebp]
mov ecx, edx
mov esi, eax
shl esi, cl
mov ecx, dword [esp + 0x18]
shr ebx, cl
or ebx, esi
add edi, 0xfffffffc
mov dword [ebp], ebx
lea ebp, [ebp + 4]
mov ebx, eax
jne 0x51c610
mov edi, dword [esp + 0xc]
mov ecx, dword [esp + 0x18]
shr eax, cl
test eax, eax
je 0x51c667
mov esi, dword [esp + 0x10]
mov ebx, eax
mov eax, dword [esp + 0x1c]
cmp esi, dword [esp + 0x3c]
jne 0x51c659
lea ecx, [esp + 0x3c]
call fcn.0051d070
mov eax, dword [esp + 0x40]
mov dword [eax + esi*4], ebx
inc esi
je 0x51c37f
mov dword [esp + 0x44], esi
cmp edi, 0x20
jb 0x51c52c
lea esi, [esp + 0x3c]
jmp 0x51c520
xor eax, eax
jmp 0x51c62e
xor edi, edi
jmp 0x51bf3e
cmp edi, dword [esp]
jne 0x51c694
mov ecx, esp
call fcn.0051d070
mov esi, dword [esp + 4]
mov dword [esi + edi*4], 1
inc edi
je 0x51c37f
mov dword [esp + 8], edi
jmp 0x51bdec
xor ebx, ebx
xor edx, edx
mov dword [esp + 0x14], 0
jmp 0x51c0bc
cmp esi, dword [esp]
jne 0x51c6cc
mov ecx, esp
call fcn.0051d070
mov ecx, dword [esp + 4]
mov dword [ecx + esi*4], 1
inc esi
je 0x51c37f
mov dword [esp + 8], esi
jmp 0x51bea2
mov ecx, eax
mov edi, 0x68
shld edx, ebx, cl
shl ebx, cl
test al, 0x20
mov eax, 0
cmovne edx, ebx
cmovne ebx, ebp
or edx, ebx
jne 0x51c24f
jmp 0x51c278