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

Disassembly:
sub esp, 0x20
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x24]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x3c]
push 8
push eax
push edi
call fcn.0040b700
mov esi, dword [sym.imp.USER32.dll_GetSysColor]
push 0x14
call esi
push 0xf
mov dword [esp + 0x2c], eax
call esi
push 0x10
mov ebx, eax
call esi
mov ecx, eax
shr ecx, 0x10
mov dword [esp + 0x20], ecx
mov ecx, ebx
shr ecx, 0x10
mov dword [esp + 0x1c], ecx
mov cx, ax
shr cx, 8
mov word [esp + 0x10], cx
mov cx, bx
shr cx, 8
movzx eax, al
mov word [esp + 0x3c], cx
mov ecx, eax
xor esi, esi
neg ecx
shl eax, 7
movzx ebp, bl
mov dword [esp + 0x18], esi
mov ebx, 0x80
mov dword [esp + 0x24], ecx
mov dword [esp + 0x14], eax
mov edi, edi
movzx eax, byte [esp + 0x1c]
movzx ecx, byte [esp + 0x20]
imul eax, esi
imul ecx, ebx
add eax, ecx
cdq
and edx, 0x7f
add eax, edx
movzx edx, byte [esp + 0x3c]
sar eax, 7
imul edx, esi
push eax
movzx eax, byte [esp + 0x14]
mov ecx, dword [esp + 0x1c]
imul eax, ebx
add eax, edx
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
push eax
mov eax, dword [esp + 0x1c]
add eax, ecx
mov ecx, dword [esp + 0x3c]
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
push eax
push esi
call fcn.0040af20
mov edx, dword [esp + 0x24]
add dword [esp + 0x14], edx
add dword [esp + 0x18], ebp
dec ebx
inc esi
cmp ebx, 0xffffffff
jg 0x401890
mov eax, dword [esp + 0x28]
mov ecx, eax
shr ecx, 0x10
mov dword [esp + 0x28], ecx
mov cx, ax
movzx eax, al
mov dword [esp + 0x2c], eax
mov dword [esp + 0x18], eax
mov eax, ebp
imul ebp, ebp, 0x7f
neg eax
shr cx, 8
mov dword [esp + 0x14], eax
movzx eax, byte [esp + 0x3c]
mov word [esp + 0x10], cx
mov ecx, eax
imul eax, eax, 0x7f
neg ecx
mov dword [esp + 0x20], ecx
movzx ecx, byte [esp + 0x1c]
mov edx, ecx
neg edx
imul ecx, ecx, 0x7f
mov dword [esp + 0x3c], ebp
mov ebx, 1
mov dword [esp + 0x24], edx
mov esi, eax
mov ebp, ecx
movzx eax, byte [esp + 0x28]
imul eax, ebx
add eax, ebp
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
push eax
movzx eax, byte [esp + 0x14]
imul eax, ebx
mov ecx, dword [esp + 0x1c]
add eax, esi
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
push eax
mov eax, dword [esp + 0x44]
add eax, ecx
mov ecx, dword [esp + 0x3c]
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
mov dl, bl
push eax
add dl, 0x7f
movzx eax, dl
push eax
call fcn.0040af20
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x2c]
add ebp, dword [esp + 0x24]
add esi, dword [esp + 0x20]
add dword [esp + 0x3c], ecx
add dword [esp + 0x18], edx
inc ebx
cmp ebx, 0x81
jl 0x401955
mov eax, dword [esp + 0x44]
mov ebx, dword [esp + 0x34]
push 5
push eax
mov ecx, ebx
call fcn.0040afc0
mov ebp, dword [ebx + 0x2c]
mov ecx, ebx
mov dword [esp + 0x3c], ebp
call fcn.0040ae90
mov dword [esp + 0x10], eax
mov esi, eax
mov eax, dword [esp + 0x38]
dec eax
cmp eax, 7
ja case.default.0x4019f8
jmp dword [eax*4 + 0x40219c]
push 0
mov ecx, ebx
call fcn.0040b0b0
mov eax, 0x7fff
cdq
idiv edi
mov dword [esp + 0x14], 0xc8
mov dword [esp + 0x2c], eax
mov eax, 0x7fff
cdq
idiv dword [esp + 0x40]
mov dword [esp + 0x28], eax
lea ebx, [ebx]
call fcn.0041eba7
cdq
idiv dword [esp + 0x2c]
mov dword [esp + 0x24], eax
call fcn.0041eba7
cdq
idiv dword [esp + 0x28]
mov esi, dword [esp + 0x40]
cmp edi, esi
mov ebp, eax
jge 0x401a54
mov esi, edi
call fcn.0041eba7
mov ecx, eax
mov eax, 0x7fff
cdq
idiv esi
mov esi, eax
mov eax, ecx
cdq
idiv esi
cdq
sub eax, edx
mov ebx, eax
sar ebx, 1
mov dword [esp + 0x38], ebx
call fcn.0041eba7
mov ecx, eax
mov eax, 0xa00a00a1
imul ecx
add edx, ecx
sar edx, 9
mov esi, edx
shr esi, 0x1f
add esi, edx
mov dword [esp + 0x18], 0
test ebx, ebx
jle 0x401b03
mov ecx, dword [esp + 0x24]
mov eax, edi
sub eax, ecx
sub ecx, ebp
mov ebx, ebp
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], ecx
nop
lea eax, [ecx + ebx]
test eax, eax
jle 0x401acd
cmp ebp, dword [esp + 0x40]
jge 0x401acd
mov ecx, dword [esp + 0x34]
push esi
push ebp
push eax
call fcn.0040af70
mov ecx, dword [esp + 0x1c]
lea edx, [ecx + ebp]
cmp edx, edi
jge 0x401af2
test ebx, ebx
jle 0x401af2
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x24]
push esi
add eax, ecx
mov ecx, dword [esp + 0x38]
push ebx
push eax
call fcn.0040af70
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
inc eax
inc ebp
dec ebx
cmp eax, dword [esp + 0x38]
mov dword [esp + 0x18], eax
jl 0x401ab0
sub dword [esp + 0x14], 1
jne 0x401a30
mov eax, dword [esp + 0x40]
mov ebx, dword [esp + 0x10]
test eax, eax
jle 0x402193
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], eax
lea ebx, [ebx]
xor esi, esi
test edi, edi
jle 0x401b79
mov eax, dword [esp + 0x34]
cdq
idiv dword [esp + 0x40]
mov ebp, edi
imul ebp, ebp, 0x63
mov dword [esp + 0x2c], eax
mov eax, ebp
cdq
idiv edi
add al, byte [esp + 0x2c]
add byte [esi + ebx], al
call fcn.0041eba7
mov ecx, eax
mov eax, 0x80100201
imul ecx
add edx, ecx
sar edx, 0xa
mov eax, edx
shr eax, 0x1f
add eax, edx
add byte [esi + ebx], al
inc esi
sub ebp, 0x63
cmp esi, edi
jl 0x401b48
add ebx, dword [esp + 0x3c]
add dword [esp + 0x34], 0x63
sub dword [esp + 0x38], 1
jne 0x401b30
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
cmp dword [esp + 0x40], 0
jle 0x401c2a
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], ecx
lea esp, [esp]
mov eax, dword [esp + 0x34]
cdq
idiv dword [esp + 0x40]
xor ebp, ebp
mov ecx, eax
sub ecx, 0x7f
mov eax, ecx
imul eax, ecx
imul eax, ecx
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
imul eax, eax, 0x70
cdq
and edx, 0x7f
add eax, edx
mov ebx, eax
sar ebx, 7
sub ebx, 0xffffff80
test edi, edi
jle 0x401c17
nop
mov byte [esi + ebp], bl
call fcn.0041eba7
mov ecx, eax
mov eax, 0x80100201
imul ecx
add edx, ecx
sar edx, 0xa
mov eax, edx
shr eax, 0x1f
add eax, edx
sub al, 8
add byte [esi + ebp], al
inc ebp
cmp ebp, edi
jl 0x401bf0
add esi, dword [esp + 0x3c]
add dword [esp + 0x34], 0xff
sub dword [esp + 0x38], 1
jne 0x401bb0
mov eax, 0x2aaaaaab
imul edi
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 0x10
mov esi, 0x10
jg 0x401c44
mov esi, eax
mov ecx, dword [esp + 0x40]
mov ebp, dword [esp + 0x10]
mov eax, ecx
imul eax, ecx
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [esp + 0x34], esi
mov dword [esp + 0x2c], eax
test ecx, ecx
jle 0x402193
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
neg eax
mov dword [esp + 0x10], eax
imul eax, esi
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], ecx
xor esi, esi
test edi, edi
jle 0x401d29
mov eax, dword [esp + 0x14]
imul eax, dword [esp + 0x10]
cdq
idiv dword [esp + 0x2c]
mov ebx, edi
mov dword [esp + 0x18], esi
mov ecx, eax
mov eax, edi
cdq
sub eax, edx
sar eax, 1
add ecx, eax
sub ecx, dword [esp + 0x34]
mov eax, edi
cdq
sub eax, edx
sar eax, 1
neg eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x40], eax
shl ebx, 7
jmp 0x401ccd
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x38]
cmp eax, ecx
jle 0x401ce5
mov eax, ebx
cdq
idiv dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
add al, 8
mov byte [esi + ebp], al
mov eax, dword [esp + 0x40]
add eax, ecx
jns 0x401cf9
mov eax, dword [esp + 0x18]
cdq
idiv dword [esp + 0x34]
mov cl, 0xf7
sub cl, al
mov byte [esi + ebp], cl
call fcn.0041eba7
mov ecx, eax
inc dword [esp + 0x40]
sub dword [esp + 0x18], 0xffffff80
mov eax, 0x80100201
imul ecx
add edx, ecx
sar edx, 0xa
mov eax, edx
shr eax, 0x1f
add eax, edx
sub al, 8
add byte [esi + ebp], al
inc esi
add ebx, 0xffffff80
cmp esi, edi
jl 0x401cc5
mov ecx, dword [esp + 0x34]
add ebp, dword [esp + 0x3c]
add dword [esp + 0x14], ecx
mov eax, 1
add dword [esp + 0x10], eax
sub dword [esp + 0x1c], eax
jne 0x401c82
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov eax, dword [esp + 0x40]
test eax, eax
jle 0x402193
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], eax
jmp 0x401d70
mov eax, dword [esp + 0x34]
cdq
idiv dword [esp + 0x40]
xor ebp, ebp
mov ecx, eax
sub ecx, 0x7f
test edi, edi
jle 0x401e3c
mov eax, ecx
imul eax, ecx
imul eax, ecx
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
mov ebx, edi
mov dword [esp + 0x2c], eax
imul ebx, ebx, 0xff
mov edi, edi
mov eax, ebx
cdq
idiv edi
mov ecx, eax
sub ecx, 0x7f
mov eax, ecx
imul eax, ecx
imul eax, ecx
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
cdq
and edx, 0x7f
add eax, edx
mov ecx, eax
sar ecx, 7
add ecx, dword [esp + 0x2c]
mov eax, ecx
shl eax, 4
sub eax, ecx
add eax, eax
add eax, eax
add eax, eax
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
sub eax, 0xffffff80
cmp eax, 8
jge 0x401dff
mov eax, 8
jmp 0x401e0b
cmp eax, 0xf7
jle 0x401e0b
mov eax, 0xf7
mov byte [esi + ebp], al
call fcn.0041eba7
mov ecx, eax
mov eax, 0x80100201
imul ecx
add edx, ecx
sar edx, 0xa
mov eax, edx
shr eax, 0x1f
add eax, edx
sub al, 8
add byte [esi + ebp], al
inc ebp
sub ebx, 0xff
cmp ebp, edi
jl 0x401db0
add esi, dword [esp + 0x3c]
add dword [esp + 0x34], 0xff
sub dword [esp + 0x38], 1
jne 0x401d70
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov dword [esp + 0x34], 0
test edi, edi
jle 0x402193
mov eax, edi
imul eax, eax, 0xff
mov dword [esp + 0x38], eax
jmp 0x401e84
mov eax, dword [esp + 0x38]
cdq
idiv edi
mov ecx, eax
sub ecx, 0x7f
mov eax, ecx
imul eax, ecx
imul eax, ecx
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
cdq
and edx, 0x7f
add eax, edx
mov ecx, eax
sar ecx, 7
mov eax, ecx
shl eax, 4
sub eax, ecx
add eax, eax
add eax, eax
add eax, eax
cdq
and edx, 0x7f
add eax, edx
mov ebx, eax
sar ebx, 7
sub ebx, 0xffffff80
cmp dword [esp + 0x40], 0
jle 0x401f09
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x10]
mov ebp, dword [esp + 0x40]
lea esi, [ecx + edx]
lea esp, [esp]
mov byte [esi], bl
call fcn.0041eba7
mov ecx, eax
mov eax, 0x80100201
imul ecx
add edx, ecx
sar edx, 0xa
mov eax, edx
shr eax, 0x1f
add eax, edx
sub al, 8
add byte [esi], al
add esi, dword [esp + 0x3c]
sub ebp, 1
jne 0x401ee0
mov eax, dword [esp + 0x34]
sub dword [esp + 0x38], 0xff
inc eax
cmp eax, edi
mov dword [esp + 0x34], eax
jl 0x401e80
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov eax, dword [esp + 0x40]
test eax, eax
jle 0x402193
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x34]
cdq
idiv dword [esp + 0x40]
xor ebp, ebp
mov ecx, eax
sub ecx, 0x7f
mov eax, ecx
imul eax, ecx
imul eax, ecx
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
cdq
and edx, 0x7f
add eax, edx
mov ecx, eax
sar ecx, 7
mov eax, ecx
shl eax, 4
sub eax, ecx
add eax, eax
add eax, eax
add eax, eax
cdq
and edx, 0x7f
add eax, edx
mov ebx, eax
sar ebx, 7
sub ebx, 0xffffff80
test edi, edi
jle 0x401fb8
lea ecx, [ecx]
mov byte [esi + ebp], bl
call fcn.0041eba7
mov ecx, eax
mov eax, 0x80100201
imul ecx
add edx, ecx
sar edx, 0xa
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
sub cl, 8
add byte [esi + ebp], cl
inc ebp
cmp ebp, edi
jl 0x401f90
add esi, dword [esp + 0x3c]
add dword [esp + 0x34], 0xff
sub dword [esp + 0x38], 1
jne 0x401f42
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov eax, dword [esp + 0x40]
test eax, eax
jle 0x402193
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], eax
nop
xor ebp, ebp
test edi, edi
jle 0x40203d
mov eax, dword [esp + 0x34]
cdq
idiv dword [esp + 0x40]
mov ebx, edi
imul ebx, ebx, 0x77
mov dword [esp + 0x2c], eax
mov eax, ebx
cdq
idiv edi
add al, byte [esp + 0x2c]
add al, 8
mov byte [esi + ebp], al
call fcn.0041eba7
mov ecx, eax
mov eax, 0x80100201
imul ecx
add edx, ecx
sar edx, 0xa
mov eax, edx
shr eax, 0x1f
add eax, edx
sub al, 8
add byte [esi + ebp], al
inc ebp
sub ebx, 0x77
cmp ebp, edi
jl 0x402008
add esi, dword [esp + 0x3c]
add dword [esp + 0x34], 0x77
sub dword [esp + 0x38], 1
jne 0x401ff0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov eax, dword [esp + 0x40]
test eax, eax
jle 0x402193
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], eax
lea ecx, [ecx]
mov eax, dword [esp + 0x34]
cdq
idiv dword [esp + 0x40]
xor ebp, ebp
mov ebx, eax
add ebx, 8
test edi, edi
jle 0x4020ac
mov byte [esi + ebp], bl
call fcn.0041eba7
mov ecx, eax
mov eax, 0x80100201
imul ecx
add edx, ecx
sar edx, 0xa
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
sub cl, 8
add byte [esi + ebp], cl
inc ebp
cmp ebp, edi
jl 0x402084
add esi, dword [esp + 0x3c]
add dword [esp + 0x34], 0xef
sub dword [esp + 0x38], 1
jne 0x402070
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov dword [esp + 0x34], 0
test edi, edi
jle 0x402193
mov eax, edi
imul eax, eax, 0xef
mov dword [esp + 0x38], eax
jmp 0x4020e9
mov eax, dword [esp + 0x38]
cdq
idiv edi
mov ebx, eax
add ebx, 8
cmp dword [esp + 0x40], 0
jle 0x402131
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x10]
mov ebp, dword [esp + 0x40]
lea esi, [edx + eax]
mov byte [esi], bl
call fcn.0041eba7
mov ecx, eax
mov eax, 0x80100201
imul ecx
add edx, ecx
sar edx, 0xa
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
sub cl, 8
add byte [esi], cl
add esi, dword [esp + 0x3c]
sub ebp, 1
jne 0x402107
mov eax, dword [esp + 0x34]
sub dword [esp + 0x38], 0xef
inc eax
cmp eax, edi
mov dword [esp + 0x34], eax
jl 0x4020e5
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov eax, dword [esp + 0x40]
test eax, eax
jle 0x402193
mov dword [esp + 0x40], eax
lea ebx, [ebx]
xor ebx, ebx
test edi, edi
jle 0x40218a
call fcn.0041eba7
mov ecx, eax
mov eax, 0x80100201
imul ecx
add edx, ecx
sar edx, 0xa
mov eax, edx
shr eax, 0x1f
add eax, edx
add al, 0x78
mov byte [ebx + esi], al
inc ebx
cmp ebx, edi
jl 0x402166
add esi, ebp
sub dword [esp + 0x40], 1
jne 0x402160
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret