Function at 0x408920
Capabilities:
Enumerate pe sections
Resolve function by parsing pe exports

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xac
mov dword [esp + 0x14], edx
mov edx, ecx
mov edi, dword [esp + 0xcc]
mov eax, dword [0x502034]
xor eax, esp
xor ebx, ebx
mov ecx, edi
and ecx, 3
setne bl
add ebx, 1
imul ebx, dword [0x503700]
mov ecx, dword [esp + 0xc8]
mov dword [esp], ecx
shr ecx, 0x16
and cl, 1
mov dword [esp + 0xa8], eax
mov esi, ebx
shl ebx, cl
and edi, 3
je 0x408987
lea eax, [edx + edx]
mov ecx, dword [0x503738]
cmp eax, dword [ecx + 0x12c]
jge 0x4098da
mov eax, dword [0x503704]
xor ebp, ebp
test dword [esp + 0xc8], 0x40000000
jne 0x4089a5
mov dword [esp + 0xc], 0
jmp 0x4089ee
cmp dword [0x5037b0], 0
je 0x4089bd
mov ecx, dword [0x503738]
cmp byte [ecx + 0x142], 0
je 0x40899b
mov ecx, dword [0x4c98b0]
lea ebp, [esp + 0xd0]
mov dword [ebp + 4], ecx
mov dword [ebp], ecx
xor ebp, ebp
mov ecx, dword [esp + 0xc8]
and ecx, 0xfecc0000
or ecx, 0x20b04
mov dword [esp], ecx
mov cl, 1
mov dword [esp + 0xc], ecx
imul esi, edx
mov edx, esi
mov ecx, dword [esp + 0x14]
imul ecx, eax
mov dword [esp + 0x14], ecx
mov dword [esp + 8], 1
test edi, edi
mov dword [esp + 0x1c], ebx
je 0x408a17
cmp dword [0x5037b4], 3
je 0x408a34
test edi, edi
je 0x408a27
cmp edi, 1
jne 0x408a2b
mov ebp, 4
jmp 0x408a34
mov ebp, edi
jmp 0x408a30
mov ebp, 0xc
mov dword [esp + 8], edi
add edx, dword [0x503744]
mov dword [esp + 0x20], edx
mov ecx, dword [esp + 0x14]
add ecx, dword [0x503740]
mov dword [esp + 0x14], ecx
mov ebx, dword [esp]
shr ebx, 0x13
mov edi, ebx
and edi, 0x10
mov ecx, dword [esp + 0xc0]
movzx ecx, word [ecx]
mov edx, ecx
add edx, 0xffffdc46
mov dword [esp + 4], 0
cmp dx, 3
ja 0x408a8f
add cl, 0x46
cmp cl, 3
ja case.default.0x408a82
movzx ecx, cl
jmp dword [ecx*4 + 0x4c9768]
add eax, eax
neg eax
jmp case.0x408a82.68
mov dword [esp + 0x38], 0
jmp 0x408ae1
xor edx, edx
jmp 0x408ab6
mov ecx, 0x99999999
jmp 0x408aab
add eax, eax
mov ecx, 0x66666667
imul ecx
mov eax, edx
shr eax, 0x1f
sar edx, 1
add edx, eax
mov ecx, dword [esp + 8]
shr ecx, 1
shl edx, cl
mov dword [esp + 0x38], edx
movzx ecx, word [0x5032e2]
mov eax, dword [esp + 0xc0]
mov word [eax], cx
and dword [esp], 0xfff7ffff
and bl, 1
mov dword [esp + 4], ebx
mov esi, dword [esp + 0xc4]
or ebp, edi
mov eax, ecx
and eax, 0xfc00
cmp eax, 0xd800
jne 0x408ba7
cmp esi, 2
jl 0x408b1d
mov eax, dword [esp + 0xc0]
movzx eax, word [eax + 2]
and eax, 0xfc00
cmp eax, 0xdc00
jne 0x408b26
jmp 0x408ba7
cmp esi, 1
jne 0x408ba7
lea edx, [esi - 1]
mov eax, esi
and eax, 7
xor ecx, ecx
cmp edx, 7
mov esi, dword [esp + 0xc0]
jb 0x408b76
mov edx, dword [esp + 0xc4]
and edx, 0xfffffff8
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esi + ecx*2], 0xfffdfffd
mov dword [esi + ecx*2 + 4], 0xfffdfffd
mov dword [esi + ecx*2 + 8], 0xfffdfffd
mov dword [esi + ecx*2 + 0xc], 0xfffdfffd
add ecx, 8
cmp edx, ecx
jne 0x408b50
test eax, eax
je 0x408b9d
mov edx, dword [esp + 0xc0]
lea ecx, [edx + ecx*2]
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ecx + edx*2], 0xfffd
add edx, 1
cmp eax, edx
jne 0x408b90
mov eax, dword [esp + 0xc0]
movzx ecx, word [eax]
and ecx, 0xff00
mov eax, ebp
or eax, 0x20
cmp ecx, 0xdc00
cmovne eax, ebp
mov edi, dword [esp]
mov ecx, edi
and ecx, 0x1ff
mov dword [esp + 0x24], ecx
mov esi, edi
shr esi, 9
and esi, 0x1ff
cmp dword [0x5037b8], 2
sete cl
mov edx, edi
shr edx, 0x12
and dl, cl
movzx ecx, dl
or ecx, eax
mov ebx, ecx
or ebx, 2
cmp byte [0x5037bc], 0
cmove ebx, ecx
test edi, 0x80000
cmove ebx, ecx
mov ecx, ebx
call fcn.00409900
test bl, 2
movzx eax, byte [esp + 4]
mov ecx, 1
cmove ecx, eax
mov ebp, ebx
and ebp, 0xfffffffc
cmp dword [ebx*4 + 0x5037c0], 0
cmovne ebp, ebx
cmovne ecx, eax
mov dword [esp + 0x50], ecx
mov ecx, ebp
call fcn.00409900
mov eax, dword [ebp*4 + 0x5037c0]
test eax, eax
cmove ebp, eax
test edi, 0x100000
jne 0x408c59
mov eax, dword [esp + 0x24]
lea edi, [esp + 0xd0]
jmp 0x408c70
lea edi, [esp + 0xd0]
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov dword [edi], ecx
mov dword [edi + 4], eax
mov eax, esi
mov esi, dword [esp + 0x24]
test dword [esp], 0x40000
sete dl
mov cl, byte [0x5038c0]
test cl, cl
sete ch
or ch, dl
mov edx, dword [esp + 0xc]
or dl, ch
jne 0x408c97
cmp eax, 0xf
ja 0x408cae
or eax, 8
test dword [esp], 0x200000
je 0x408cd2
test cl, cl
je 0x408cd2
cmp esi, 0xf
ja 0x408cc5
or esi, 8
jmp 0x408cd2
xor edx, edx
cmp eax, 0x100
setae dl
or eax, edx
test dword [esp], 0x200000
jne 0x408ca0
jmp 0x408cd2
xor ecx, ecx
cmp esi, 0x100
setae cl
or esi, ecx
mov ecx, dword [0x503778]
test ecx, ecx
jne 0x408cf4
cmp byte [edi], 0
je 0x408cf4
movzx eax, word [edi + 1]
movzx edx, byte [edi + 3]
shl edx, 0x10
or edx, eax
test ecx, ecx
je 0x408cff
jmp 0x408d1d
mov edx, dword [eax*4 + 0x5038c4]
test ecx, ecx
jne 0x408d1d
cmp byte [edi + 4], 0
je 0x408d1d
movzx eax, word [edi + 5]
movzx esi, byte [edi + 7]
shl esi, 0x10
or esi, eax
test dword [esp], 0x1000000
jne 0x408d2d
jmp 0x408d72
mov esi, dword [esi*4 + 0x5038c4]
test dword [esp], 0x1000000
je 0x408d72
test ecx, ecx
jne 0x408d72
movzx eax, dl
add eax, eax
imul ecx, eax, 0xaaab
shr ecx, 0x11
mov eax, edx
shr eax, 7
and eax, 0x1fe
imul eax, eax, 0xaaab
shr eax, 9
and eax, 0xff00
or eax, ecx
shr edx, 0xf
and edx, 0x1fe
imul edx, edx, 0xaaab
shr edx, 1
and edx, 0xff0000
or edx, eax
mov edi, edx
push dword [ebp*4 + 0x5037c0]
push dword [0x5037a4]
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x40], edi
push edi
push dword [0x5037a4]
call dword [sym.imp.GDI32.dll_SetTextColor]
push esi
push dword [0x5037a4]
call dword [sym.imp.GDI32.dll_SetBkColor]
mov eax, dword [esp]
sar eax, 0x1f
add eax, 2
push eax
push dword [0x5037a4]
call dword [sym.imp.GDI32.dll_SetBkMode]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x74], eax
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x78], ecx
mov eax, dword [0x503704]
add eax, ecx
mov dword [esp + 0x80], eax
mov esi, dword [esp + 0xc4]
test esi, esi
jle 0x408eaa
xor ecx, ecx
xor eax, eax
xor edx, edx
mov ebp, dword [esp + 0xc0]
jmp 0x408e18
mov esi, edx
add esi, 1
mov edx, esi
mov edi, dword [esp + 0xc4]
cmp esi, edi
mov esi, edi
jge 0x408eb3
mov ebx, esi
lea esi, [edx + 1]
movzx edi, word [ebp + edx*2]
cmp esi, ebx
jge 0x408e80
movzx ebx, di
cmp ebx, 0xdb40
jne 0x408e50
movzx ebx, word [ebp + edx*2 + 2]
invalid