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

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, edx
sub esp, 0x5c
cmp edx, 0x20
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], ecx
ja 0x5d5072
mov eax, dword [esp + 0x70]
test edx, edx
mov esi, dword [eax]
je 0x5d506c
lea eax, [esi + 0xdac]
xor edi, edi
mov dword [esp + 0x28], eax
jmp 0x5d4fb3
mov eax, dword [esi + 0xda8]
mov edx, dword [esi + 0xda4]
cmp edx, eax
jge 0x5d5000
mov ecx, edx
sar ecx, 0x1f
shr ecx, 0x1d
lea ebp, [ecx + edx]
add edx, 1
mov eax, ebp
and ebp, 7
sar eax, 3
sub ebp, ecx
movzx eax, byte [esi + eax + 0xdac]
mov ecx, 7
sub ecx, ebp
sar eax, cl
and eax, 1
cmp edx, 0x2000
mov byte [esp + edi + 0x30], al
mov dword [esi + 0xda4], edx
je 0x5d5053
add edi, 1
cmp ebx, edi
jle 0x5d5000
mov ecx, dword [esi + 0xda0]
test ecx, ecx
jne 0x5d4f56
mov edx, dword [esp + 0x28]
mov dword [esp + 8], 0x400
mov dword [esp + 4], edx
mov edx, dword [esp + 0x24]
mov eax, dword [edx]
mov dword [esp], eax
call fcn.004954d0
mov edx, dword [esi + 0xda4]
mov dword [esi + 0xda0], 1
shl eax, 3
cmp edx, eax
mov dword [esi + 0xda8], eax
jl 0x5d4f6a
lea esi, [esi]
cmp ebx, edi
mov eax, edi
jbe 0x5d501b
lea esi, [esp + 0x30]
lea esi, [esi]
mov byte [esi + eax], 0
add eax, 1
cmp eax, ebx
jne 0x5d5010
test ebx, ebx
je 0x5d506e
lea ecx, [ebx - 1]
mov eax, 1
shl eax, cl
xor edx, edx
xor ecx, ecx
lea esi, [esp + 0x30]
movsx ebp, byte [esi + edx]
add edx, 1
imul ebp, eax
shr eax, 1
add ecx, ebp
cmp edx, ebx
jne 0x5d5031
mov eax, dword [esp + 0x2c]
mov dword [eax], ecx
add esp, 0x5c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esi + 0xda4], 0
mov dword [esi + 0xda0], 0
jmp 0x5d4fac
xor edi, edi
xor ecx, ecx
jmp 0x5d5043
mov dword [esp + 0x10], 0x20
mov dword [esp + 0xc], edx
mov dword [esp + 8], str.get_bstm__:__d:__d_Error._n
mov dword [esp + 4], 1
mov dword [esp], 0xc
call fcn.0042b9b0
mov dword [esp], 1
call sub.msvcrt.dll_exit
lea esi, [esi]
lea edi, [edi]
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x7c
mov eax, dword [ebp + 8]
cmp dword [ebp + 0x10], 0
mov dword [ebp - 0x50], 0
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x44], eax
jle 0x5d556a
mov edx, dword [ebp + 8]
lea ecx, [eax + 0x18]
lea ebx, [eax + 0x1c]
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x60], ebx
add edx, 0x28
mov dword [ebp - 0x24], edx
mov esi, dword [ebp - 0x44]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x58], esp
mov eax, dword [esi + 0xd9c]
shl eax, 2
imul eax, dword [edi + 0x44]
add eax, 0x1e
and eax, 0xfffffff0
call fcn.008e9550
lea eax, [esp + 0x1f]
and eax, 0xfffffff0
mov dword [ebp - 0x48], eax
call dword [0xc11744]
mov edx, dword [edi + 0x28]
mov ecx, edi
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0x34], edx
mov edx, dword [edx + 0x74]
mov dword [ebp - 0x54], eax
mov dword [esp], ebx
mov eax, dword [ebp - 0x30]
call fcn.005d4f20
mov esi, dword [ebp - 0x60]
mov dword [ebp - 0x38], eax
mov dword [esp + 4], esi
mov edi, dword [ebp - 0x44]
mov eax, dword [edi + 0x18]
mov dword [esp], eax
call dword [0xc11748]
test eax, eax
jne 0x5d585f
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x34]
mov eax, dword [eax + 0x1c]
mov edx, dword [edx + eax*4 + 0xd8c]
cmp eax, 2
mov dword [ebp - 0x4c], eax
mov esi, dword [ecx + eax*4 + 0xd7c]
mov dword [ebp - 0x2c], edx
je 0x5d58a2
imul eax, dword [ebp - 0x4c], 0x3c
add eax, dword [ebp - 0x34]
mov dword [ebp - 0x20], 0
cmp dword [eax + 0xa8], 0
jle 0x5d51f3
xor ebx, ebx
mov edi, eax
mov edx, dword [ebp - 0x30]
lea eax, [ebx*4]
mov ecx, dword [ebp - 0x24]
add eax, dword [edx + 0x20]
mov dword [esp], ecx
mov edx, dword [esi]
add esi, 4
mov ecx, dword [ebp + 8]
call fcn.005d4f20
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax + ebx*4]
mov eax, dword [edi + 0xa8]
add eax, ebx
add ebx, 1
shl eax, 2
add eax, dword [ecx + 0x20]
mov ecx, dword [ebp - 0x24]
mov dword [esp], ecx
mov ecx, dword [ebp + 8]
call fcn.005d4f20
add eax, dword [ebp - 0x28]
add dword [ebp - 0x20], eax
cmp ebx, dword [edi + 0xa8]
jl 0x5d519a
mov esi, dword [ebp - 0x34]
mov edi, dword [ebp - 0x34]
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x34]
add esi, 0x70
mov ebx, dword [ebp - 0x20]
add edi, 0x88
add ebx, dword [ebp - 0x38]
add eax, 0x3c
add edx, 0x40
cmp dword [ecx + 0x70], 0
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x3c], edx
jle 0x5d5887
imul eax, dword [ebp - 0x4c], 0x3c
xor edi, edi
mov dword [ebp - 0x28], 0
lea ebx, [ecx + eax + 0xa0]
mov eax, dword [ecx + eax + 0xa4]
mov esi, ebx
test eax, eax
jle 0x5d52a8
mov ecx, dword [esi + 0x10]
mov dword [ebp - 0x20], 0
nop
lea esi, [esi]
test ecx, ecx
jle 0x5d529f
xor ebx, ebx
jmp 0x5d526b
mov eax, dword [esi + 4]
imul eax, dword [ebp - 0x28]
add eax, dword [ebp - 0x20]
mov edx, dword [esi + 0x14]
imul eax, ecx
mov ecx, dword [ebp - 0x2c]
add eax, ebx
add ebx, 1
shl eax, 2
add eax, dword [ecx]
mov ecx, dword [ebp - 0x24]
mov dword [esp], ecx
mov ecx, dword [ebp + 8]
call fcn.005d4f20
mov ecx, dword [esi + 0x10]
add edi, eax
cmp ebx, ecx
jl 0x5d5268
mov eax, dword [esi + 4]
add dword [ebp - 0x20], 1
cmp dword [ebp - 0x20], eax
jl 0x5d5260
mov ebx, dword [ebp - 0x40]
add dword [ebp - 0x28], 1
mov edx, dword [ebp - 0x28]
cmp edx, dword [ebx]
jl 0x5d524d
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x20], 0
cmp dword [ecx + 0x70], 0
jle 0x5d5889
xor ebx, ebx
test eax, eax
jle 0x5d5305
mov dword [ebp - 0x28], esi
imul eax, dword [ebp - 0x20]
mov esi, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x24]
add eax, ebx
add ebx, 1
shl eax, 2
add eax, dword [esi]
mov dword [esp], edx
mov esi, dword [ebp - 0x38]
mov ecx, dword [ebp + 8]
mov edx, dword [esi]
call fcn.005d4f20
mov edx, dword [ebp - 0x28]
add edi, eax
mov eax, dword [edx + 4]
cmp ebx, eax
jl 0x5d52d3
mov esi, edx
mov ecx, dword [ebp - 0x40]
add dword [ebp - 0x20], 1
mov ebx, dword [ebp - 0x20]
cmp ebx, dword [ecx]
jl 0x5d52ca
add edi, dword [ebp - 0x5c]
xor esi, esi
mov dword [ebp - 0x2c], edi
mov edi, dword [ebp - 0x34]
cmp dword [edi + 0x70], 0
jle 0x5d5479
imul eax, dword [ebp - 0x4c], 0x3c
mov edx, edi
mov dword [ebp - 0x28], 0
xor edi, edi
add edx, eax
mov eax, dword [edx + 0xb8]
mov dword [ebp - 0x20], edx
mov ecx, dword [ebp - 0x30]
lea ebx, [eax + 1]
mov esi, dword [ebp - 0x24]
imul ebx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x34]
mov edx, dword [eax + 0x8c]
lea eax, [ebx*4]
add eax, dword [ecx + 0x2c]
mov dword [esp], esi
mov ecx, dword [ebp + 8]
call fcn.005d4f20
mov edx, dword [ebp - 0x20]
add edi, eax
mov eax, dword [edx + 0xb8]
test eax, eax
jle 0x5d53b9
lea ebx, [ebx*4 + 4]
xor esi, esi
mov ecx, dword [ebp - 0x34]
add esi, 1
mov edx, dword [ecx + 0x90]
mov ecx, dword [ebp - 0x30]
mov eax, dword [ecx + 0x2c]
mov ecx, dword [ebp - 0x24]
add eax, ebx
add ebx, 4
mov dword [esp], ecx
mov ecx, dword [ebp + 8]
call fcn.005d4f20
mov edx, dword [ebp - 0x20]
add edi, eax
mov eax, dword [edx + 0xb8]
cmp esi, eax
jl 0x5d5385
mov ecx, dword [ebp - 0x34]
add dword [ebp - 0x28], 1
mov edx, dword [ecx + 0x70]
cmp dword [ebp - 0x28], edx
jl 0x5d5342
add dword [ebp - 0x2c], edi
xor esi, esi
test edx, edx
jle 0x5d5479
xor edi, edi
mov esi, ecx
mov dword [ebp - 0x20], edi
mov ebx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x30]
mov edx, dword [esi + 0x78]
mov eax, dword [ecx + ebx*4 + 0x30]
mov ebx, dword [ebp - 0x24]
mov dword [esp], ebx
mov ecx, dword [ebp + 8]
call fcn.005d4f20
mov ecx, dword [ebp - 0x30]
mov edx, dword [esi + 0x7c]
mov ebx, eax
mov eax, dword [ebp - 0x20]
mov eax, dword [ecx + eax*4 + 0x30]
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x6c], eax
add eax, 4
mov dword [esp], ecx
mov ecx, dword [ebp + 8]
call fcn.005d4f20
add eax, ebx
mov ebx, dword [esi + 0x84]
add edi, eax
test ebx, ebx
jle 0x5d5467
xor ebx, ebx
mov dword [ebp - 0x28], edi
mov edi, dword [ebp - 0x20]
lea eax, [ebx*4 + 8]
add ebx, 1
mov ecx, dword [ebp - 0x30]
mov edx, dword [esi + 0x80]
add eax, dword [ecx + edi*4 + 0x30]
mov edi, dword [ebp - 0x24]
mov dword [esp], edi
mov ecx, dword [ebp + 8]
call fcn.005d4f20
add dword [ebp - 0x28], eax
cmp ebx, dword [esi + 0x84]
jl 0x5d5431
mov edi, dword [ebp - 0x28]
add dword [ebp - 0x20], 1
mov eax, dword [ebp - 0x20]
cmp eax, dword [esi + 0x70]
jl 0x5d53e0
mov esi, edi
imul eax, dword [ebp - 0x4c], 0x3c
mov edx, dword [ebp - 0x34]
add esi, dword [ebp - 0x2c]
cmp dword [edx + eax + 0xbc], 0
mov dword [ebp - 0x38], esi
jne 0x5d5575
imul eax, dword [ebp - 0x4c], 0x3c
add eax, dword [ebp - 0x34]
cmp dword [eax + 0xc0], 0
je 0x5d555b
mov esi, dword [ebp - 0x34]
cmp dword [esi + 0x70], 0
jle 0x5d5896
imul edi, dword [ebp - 0x4c], 0x3c
add edi, dword [ebp - 0x34]
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
cmp dword [eax + 0xa4], 0
jle 0x5d5542
mov eax, dword [eax + 0xac]
mov dword [ebp - 0x2c], 0
mov esi, dword [edi + 0xc4]
mov ebx, eax
sub ebx, esi
imul ebx, dword [ebp - 0x2c]
cmp esi, eax
jge 0x5d5533
shl ebx, 2
nop
lea esi, [esi]
mov edx, dword [ebp - 0x28]
add esi, 1
mov ecx, dword [ebp - 0x30]
mov eax, dword [ecx + edx*4 + 0x4c]
mov edx, dword [ebp - 0x24]
add eax, ebx
add ebx, 4
mov dword [esp], edx
mov ecx, dword [ebp + 8]
mov edx, dword [edi + 0xc8]
call fcn.005d4f20
add dword [ebp - 0x20], eax
mov eax, dword [edi + 0xac]
cmp esi, eax
jl 0x5d5500
add dword [ebp - 0x2c], 1
mov ecx, dword [ebp - 0x2c]
cmp ecx, dword [edi + 0xa4]
jl 0x5d54e6
mov ebx, dword [ebp - 0x34]
add dword [ebp - 0x28], 1
mov esi, dword [ebp - 0x28]
cmp esi, dword [ebx + 0x70]
jl 0x5d54cd
mov ecx, dword [ebp - 0x20]
add dword [ebp - 0x38], ecx
mov ebx, dword [ebp - 0x38]
cmp dword [ebp - 0x54], ebx
je 0x5d5643
mov esp, dword [ebp - 0x58]
mov eax, dword [ebp - 0x50]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebp + 8]
cmp dword [edx + 0x94], 0
mov dword [ebp - 0x20], 0
mov edi, dword [ecx + 0x28]
jle 0x5d55ec
xor ebx, ebx
mov esi, dword [ebp - 0x30]
lea eax, [ebx*4]
mov edx, dword [edi + 0xd88]
mov ecx, dword [ebp - 0x24]
add eax, dword [esi + 0x40]
mov edx, dword [edx + ebx*4]
mov dword [esp], ecx
mov ecx, dword [ebp + 8]
call fcn.005d4f20
mov ecx, dword [ebp - 0x40]
mov esi, eax
mov eax, dword [edi + 0xd98]
mov edx, dword [eax + ebx*4]
mov eax, ebx
add ebx, 1
add eax, dword [ecx + 0x24]
mov ecx, dword [ebp - 0x30]
shl eax, 2
add eax, dword [ecx + 0x40]
mov ecx, dword [ebp - 0x24]
mov dword [esp], ecx
mov ecx, dword [ebp + 8]
call fcn.005d4f20
lea eax, [esi + eax]
mov esi, dword [ebp - 0x40]
add dword [ebp - 0x20], eax
cmp ebx, dword [esi + 0x24]
jl 0x5d558d
mov edi, dword [ebp - 0x34]
cmp dword [edi + 0x70], 0
jle 0x5d5638
mov edi, dword [ebp - 0x40]
xor ebx, ebx
mov ecx, dword [ebp - 0x30]
mov esi, dword [ebp - 0x24]
mov edx, dword [edi + 0x28]
lea eax, [ecx + ebx*4 + 0x38]
mov dword [esp], esi
mov ecx, dword [ebp + 8]
call fcn.005d4f20
mov ecx, dword [ebp - 0x30]
mov edx, dword [edi + 0x2c]
mov esi, eax
lea eax, [ecx + ebx*4 + 0x44]
mov ecx, dword [ebp - 0x24]
add ebx, 1
mov dword [esp], ecx
mov ecx, dword [ebp + 8]
call fcn.005d4f20
add eax, esi
add dword [ebp - 0x20], eax
cmp ebx, dword [edi]
jl 0x5d55fa
mov ebx, dword [ebp - 0x20]
add dword [ebp - 0x38], ebx
jmp 0x5d5494
mov eax, dword [ebp - 0x54]
mov ecx, 8
mov edx, eax
sar edx, 0x1f
idiv ecx
test eax, eax
je 0x5d5567
mov esi, dword [ebp - 0x48]
mov dword [esp + 4], esi
mov edi, dword [ebp - 0x30]
mov dword [esp], edi
call dword [0xc11740]
mov edx, dword [ebp - 0x44]
mov eax, dword [edx + 0x11ac]
test eax, eax
jne 0x5d575a
mov edi, dword [ebp + 8]
cmp dword [edi + 0x38], 9
je 0x5d5796
mov ecx, dword [ebp + 8]
mov ebx, dword [ebp - 0x44]
mov ecx, dword [ecx + 0x44]
mov esi, dword [ebx + 0xd9c]
test ecx, ecx
mov dword [ebp - 0x34], ecx
je 0x5d572c
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], edi
lea edi, [ecx*4]
mov eax, dword [ebp - 0x20]
test esi, esi
mov edx, dword [ebp - 0x48]
lea ebx, [edx + eax*4]
je 0x5d5719
mov ecx, dword [ebp - 0x28]
xor edx, edx
jmp 0x5d56fa
fld dword [0xa14940]
fcom st(1)
fnstsw ax
sahf
jae 0x5d56e5
fstp st(1)
jmp 0x5d56e7
fstp st(0)
fld qword [0xa14950]
add edx, 1
fmulp st(1)
fstp dword [ecx]
add ecx, edi
cmp esi, edx
jbe 0x5d5719
fld dword [ebx + edx*4]
ftst
fnstsw ax
sahf
jae 0x5d56d4
fcom dword [0xa14948]
fnstsw ax
sahf
jae 0x5d56e7
fstp st(0)
fld dword [0xa14948]
jmp 0x5d56e7
add dword [ebp - 0x2c], 1
mov edx, dword [ebp - 0x2c]
add dword [ebp - 0x20], esi
add dword [ebp - 0x28], 4
cmp dword [ebp - 0x34], edx
ja 0x5d56c0
mov ecx, dword [ebp + 8]
mov ebx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x34]
imul eax, dword [ecx + 0x40]
imul eax, dword [ebx + 0xd9c]
add dword [ebp - 0x50], eax
mov esi, dword [ebp - 0x50]
cmp dword [ebp + 0x10], esi
mov esp, dword [ebp - 0x58]
jle 0x5d556a
add dword [ebp + 0xc], eax
jmp 0x5d50e8
mov ecx, dword [ebp + 8]
sub eax, 1
mov dword [edx + 0x11ac], eax
mov eax, dword [ecx + 0x44]
imul eax, dword [ecx + 0x40]
imul eax, dword [edx + 0xd9c]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov ebx, dword [ebp + 0xc]
mov dword [esp], ebx
call sub.msvcrt.dll_memset
mov esi, dword [ebp + 8]
mov esi, dword [esi + 0x44]
mov dword [ebp - 0x34], esi
jmp 0x5d572c
mov eax, dword [edi + 0x44]
mov edx, dword [ebp - 0x44]
test eax, eax
mov dword [ebp - 0x34], eax
mov esi, dword [edx + 0xd9c]
je 0x5d572c
mov ecx, dword [ebp + 0xc]
lea edi, [eax + eax]
mov dword [ebp - 0x20], 0
fld dword [0xa14944]
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x2c], ecx
mov eax, dword [ebp - 0x20]
test esi, esi
mov edx, dword [ebp - 0x48]
lea ebx, [edx + eax*4]
je 0x5d5841
fnstcw word [ebp - 0x1a]
mov ecx, dword [ebp - 0x2c]
xor edx, edx
movzx eax, word [ebp - 0x1a]
mov ah, 0xc
mov word [ebp - 0x1c], ax
jmp 0x5d5811
fld dword [0xa14940]
fcom st(1)
fnstsw ax
sahf
jae 0x5d57f8
fstp st(1)
jmp 0x5d57fa
fstp st(0)
fadd dword [0xa14944]
add edx, 1
fldcw word [ebp - 0x1c]
fistp word [ecx]
fldcw word [ebp - 0x1a]
add ecx, edi
cmp esi, edx
jbe 0x5d5841
fld dword [ebx + edx*4]
ftst
fnstsw ax
sahf
jae 0x5d57e7
fcom dword [0xa14948]
fnstsw ax
sahf
jae 0x5d582e
fstp st(0)
fld dword [0xa14948]
fsub st(1)
add edx, 1
fldcw word [ebp - 0x1c]
fistp word [ecx]
fldcw word [ebp - 0x1a]
add ecx, edi
cmp esi, edx
ja 0x5d5811
add dword [ebp - 0x28], 1
mov edx, dword [ebp - 0x28]
add dword [ebp - 0x20], esi
add dword [ebp - 0x2c], 2
cmp dword [ebp - 0x34], edx
ja 0x5d57c6
fstp st(0)
jmp 0x5d572c
mov eax, dword [edi + 0x18]
mov dword [esp + 8], str.Error:_unknown_window_type:__d_n
mov dword [esp + 4], 1
mov dword [esp], 0xc
mov dword [esp + 0xc], eax
call fcn.0042b9b0
jmp 0x5d5567
xor edi, edi
add edi, dword [ebp - 0x5c]
xor esi, esi
mov dword [ebp - 0x2c], edi
jmp 0x5d5479
mov dword [ebp - 0x20], 0
jmp 0x5d5555
mov eax, ecx
add eax, 0x120
mov dword [esp + 0xc], edx
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov dword [esp], 0
call dword [0xc1174c]
jmp 0x5d517f