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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4dc3da
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x60
push ebx
mov ebx, ecx
push ebp
push esi
mov eax, dword [ebx + 0x78]
push edi
test eax, eax
mov dword [esp + 0x2c], ebx
jne 0x499f94
mov ecx, dword [ebx + 0x1c]
lea eax, [esp + 0x60]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetClientRect]
mov ecx, dword [esp + 0x6c]
mov esi, dword [esp + 0x68]
mov edx, dword [esp + 0x64]
mov edi, dword [esp + 0x60]
mov eax, ecx
mov ebp, esi
sub eax, edx
sub ebp, edi
cmp eax, ebp
jge 0x499bf7
mov eax, edx
push 0
sub eax, ecx
lea ecx, [esp + 0x64]
sub eax, edi
add eax, esi
cdq
sub eax, edx
sar eax, 1
neg eax
push eax
push ecx
jmp 0x499c0e
mov eax, ecx
sub eax, edx
sub eax, esi
add eax, edi
cdq
sub eax, edx
lea edx, [esp + 0x60]
sar eax, 1
neg eax
push eax
push 0
push edx
call dword [sym.imp.USER32.dll_InflateRect]
mov esi, dword [esp + 0x6c]
mov edi, dword [esp + 0x64]
mov ecx, esi
mov eax, 0x4ec4ec4f
sub ecx, edi
push 0x48
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
lea ecx, [edx + eax + 1]
mov edx, dword [esp + 0x64]
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x18], ecx
add eax, edx
cdq
sub eax, edx
mov ebp, eax
lea eax, [esi + edi]
cdq
sub eax, edx
mov edi, eax
sar ebp, 1
sar edi, 1
mov dword [esp + 0x44], ebp
mov dword [esp + 0x2c], edi
call fcn.004a8eaa
mov esi, eax
add esp, 4
test esi, esi
je 0x499d12
mov ecx, dword [ebx + 0x64]
mov edx, dword [esp + 0x14]
push 0
push 0xff
mov dword [esp + 0x40], ecx
mov dword [esi], method.CCommandLineInfo.virtual_0
mov dword [esi + 0x3c], ebp
mov dword [esi + 0x40], edi
mov dword [esi + 0x44], edx
call fcn.00499960
push 0
push 0xff
mov edi, eax
call fcn.00499960
push 0
push 0xff
mov dword [esp + 0x54], eax
call fcn.00499960
xor ecx, ecx
and edi, 0xff
mov ch, al
add esp, 0x18
mov cl, byte [esp + 0x3c]
shl ecx, 8
mov eax, ecx
or eax, edi
mov dword [esi + 0x34], eax
mov ecx, dword [0x518510]
cmp ecx, 8
jne 0x499cf5
mov edx, dword [esp + 0x38]
push 0xffffff
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.GDI32.dll_GetNearestPaletteIndex]
and eax, 0xffff
or eax, 0x1000000
mov edx, dword [esp + 0x14]
lea ecx, [esi + 4]
mov dword [esi + 0x38], eax
mov eax, dword [esi + 0x40]
push ecx
mov ecx, dword [esi + 0x3c]
push edx
push eax
push ecx
mov ecx, esi
call fcn.004999c0
jmp 0x499d14
xor esi, esi
mov eax, dword [ebx + 0x78]
lea ecx, [ebx + 0x70]
push esi
push eax
call fcn.004a4665
fild dword [esp + 0x14]
mov edx, dword [esp + 0x14]
mov dword [esp + 0x20], 1
add ebp, edx
mov dword [esp + 0x18], 6
fstp dword [esp + 0x1c]
mov dword [esp + 0x24], ebp
mov edi, dword [esp + 0x24]
mov ebp, dword [esp + 0x28]
xor esi, esi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], ebp
mov dword [esp + 0x3c], esi
fld dword [esp + 0x1c]
fmul dword [esi + 0x4f2b30]
call fcn.00438868
fld dword [esp + 0x1c]
fmul dword [esi + 0x4f2b48]
mov dword [esp + 0x4c], eax
call fcn.00438868
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x18]
cmp eax, 7
jge 0x499f5c
fild dword [esp + 0x18]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x38], eax
fmul qword [0x4f2da0]
fadd qword [0x4e9460]
fstp qword [esp + 0x54]
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x40]
mov ecx, ebp
mov edx, edi
sub ecx, esi
sub edx, eax
push ecx
push edx
mov ecx, ebx
call fcn.00499450
push 0x48
mov dword [esp + 0x48], eax
call fcn.004a8eaa
mov esi, eax
add esp, 4
mov dword [esp + 0x48], esi
test esi, esi
mov dword [esp + 0x78], 0
je 0x499f1b
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x54]
fild dword [esp + 0x44]
push 0x3ff00000
push 0
push eax
push ecx
sub esp, 8
fstp qword [esp]
call fcn.0044e520
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x2c]
mov ebx, eax
push 0x10
mov eax, dword [edx + 0x64]
mov edx, ebx
and edx, 0xff
mov dword [esp + 0x64], eax
push edx
mov dword [esi], method.CCommandLineInfo.virtual_0
mov dword [esi + 0x3c], edi
mov dword [esi + 0x40], ebp
mov dword [esi + 0x44], ecx
call fcn.00499960
mov edi, eax
xor eax, eax
mov al, bh
push 0x10
and eax, 0xff
push eax
call fcn.00499960
mov ecx, ebx
push 0x10
shr ecx, 0x10
and ecx, 0xff
mov dword [esp + 0x70], eax
push ecx
call fcn.00499960
xor edx, edx
and edi, 0xff
mov dh, al
add esp, 0x30
mov dl, byte [esp + 0x44]
shl edx, 8
mov eax, edx
or eax, edi
mov dword [esi + 0x34], eax
mov ecx, dword [0x518510]
cmp ecx, 8
jne 0x499e9e
mov eax, dword [esp + 0x48]
push ebx
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.GDI32.dll_GetNearestPaletteIndex]
and eax, 0xffff
or eax, 0x1000000
fld dword [esp + 0x1c]
fmul dword [0x4f2d98]
mov dword [esi + 0x38], eax
mov eax, dword [esp + 0x14]
mov ebx, dword [esi + 0x40]
mov ebp, dword [esi + 0x3c]
cdq
sub eax, edx
mov edi, eax
sar edi, 1
call fcn.00438868
cdq
sub eax, edx
mov edx, ebx
sar eax, 1
sub edx, eax
mov ecx, ebp
mov dword [esp + 0x48], edx
mov dword [esi + 8], edx
mov edx, ebx
sub ecx, edi
sub edx, edi
add eax, ebx
mov dword [esi + 0x10], edx
lea edx, [edi + ebp]
mov dword [esp + 0x44], edx
mov dword [esi + 0x14], edx
mov edx, dword [esp + 0x48]
add edi, ebx
mov ebx, dword [esp + 0x2c]
mov dword [esi + 0x18], edx
mov edx, dword [esp + 0x44]
mov dword [esi + 0xc], ebp
mov dword [esi + 0x24], ebp
mov ebp, dword [esp + 0x34]
mov dword [esi + 0x28], edi
mov edi, dword [esp + 0x30]
mov dword [esi + 4], ecx
mov dword [esi + 0x1c], edx
mov dword [esi + 0x20], eax
mov dword [esi + 0x2c], ecx
mov dword [esi + 0x30], eax
jmp 0x499f1d
xor esi, esi
mov eax, dword [ebx + 0x78]
lea ecx, [ebx + 0x70]
push esi
push eax
mov dword [esp + 0x80], 0xffffffff
call fcn.004a4665
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x50]
mov eax, dword [esp + 0x38]
add edi, edx
add ebp, ecx
dec eax
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], eax
jne 0x499da8
mov esi, dword [esp + 0x3c]
add esi, 4
cmp esi, 0x18
mov dword [esp + 0x3c], esi
jl 0x499d59
mov edi, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x18]
inc edi
add esi, ecx
dec eax
mov dword [esp + 0x20], edi
test eax, eax
mov dword [esp + 0x24], esi
mov dword [esp + 0x18], eax
jg 0x499d43
mov ecx, dword [esp + 0x70]
pop edi
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret