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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x74
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
test esi, esi
je 0x404da3
xor eax, eax
lea ecx, [esp + 0x68]
mov dword [esp + 0x6c], eax
push ecx
mov dword [esp + 0x74], eax
push 0x18
mov dword [esp + 0x7c], eax
push esi
mov dword [esp + 0x84], eax
mov dword [esp + 0x74], 0
mov dword [esp + 0x88], eax
call dword [sym.imp.GDI32.dll_GetObjectW]
test eax, eax
je 0x404da3
mov eax, dword [esp + 0x6c]
test eax, eax
je 0x404da3
mov edx, dword [esp + 0x70]
test edx, edx
je 0x404da3
mov eax, dword [esp + 0x74]
test eax, eax
je 0x404da3
cmp byte [ebp + 0xc], 1
ja 0x404da3
mov cx, word [esp + 0x7a]
cmp cx, 0x20
ja 0x404da3
jae 0x40531c
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x20], ebx
je 0x404da3
push ebx
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov edi, eax
test edi, edi
jne 0x404dac
push ebx
push eax
call dword [sym.imp.USER32.dll_ReleaseDC]
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x70]
test eax, eax
mov dword [esp + 0xc], 0
jle 0x4052f3
mov eax, dword [esp + 0x6c]
mov ebx, dword [esp + 0xc]
xor esi, esi
test eax, eax
jle 0x4052e2
push esi
push ebx
push edi
call dword [sym.imp.GDI32.dll_GetPixel]
mov cl, byte [ebp + 0xc]
test cl, cl
jne 0x404e63
xor edx, edx
mov ecx, eax
mov dl, ah
and eax, 0xff
and edx, 0xff
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
shr ecx, 0x10
and ecx, 0xff
fmul qword [0x453948]
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
mov dword [esp + 0x10], eax
fmul qword [0x453940]
faddp st(1)
fild dword [esp + 0x10]
fmul qword [0x453938]
faddp st(1)
call fcn.004331b8
mov byte [esp + 0x18], al
mov eax, dword [esp + 0x18]
and eax, 0xff
mov edx, eax
shl edx, 8
or edx, eax
shl edx, 8
or edx, eax
push edx
push esi
push ebx
push edi
call dword [sym.imp.GDI32.dll_SetPixel]
jmp 0x4052d5
cmp cl, 1
jne 0x4052d5
mov ecx, eax
xor edx, edx
and ecx, 0xff
mov dl, ah
mov dword [esp + 0x10], ecx
and edx, 0xff
fild dword [esp + 0x10]
mov dword [esp + 0x10], edx
shr eax, 0x10
fmul qword [0x453930]
and eax, 0xff
fstp qword [esp + 0x40]
fild dword [esp + 0x10]
mov dword [esp + 0x10], eax
fmul qword [0x453930]
fstp qword [esp + 0x28]
fild dword [esp + 0x10]
fmul qword [0x453930]
fstp qword [esp + 0x10]
fld qword [esp + 0x28]
fcomp qword [esp + 0x10]
fnstsw ax
test ah, 0x41
jne 0x404ed1
fld qword [esp + 0x28]
jmp 0x404ed5
fld qword [esp + 0x10]
fld qword [esp + 0x40]
fcomp st(1)
fnstsw ax
test ah, 0x41
fstp st(0)
jne 0x404eea
fld qword [esp + 0x40]
jmp 0x404f03
fld qword [esp + 0x28]
fcomp qword [esp + 0x10]
fnstsw ax
test ah, 0x41
jne 0x404eff
fld qword [esp + 0x28]
jmp 0x404f03
fld qword [esp + 0x10]
fld qword [esp + 0x28]
fcomp qword [esp + 0x10]
fnstsw ax
test ah, 1
je 0x404f18
fld qword [esp + 0x28]
jmp 0x404f1c
fld qword [esp + 0x10]
fld qword [esp + 0x40]
fcomp st(1)
fnstsw ax
test ah, 1
fstp st(0)
je 0x404f3d
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
jmp 0x404f6e
fld qword [esp + 0x28]
fcomp qword [esp + 0x10]
fnstsw ax
test ah, 1
je 0x404f5e
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], eax
jmp 0x404f6e
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], edx
fld qword [esp + 0x30]
fadd st(1)
fst qword [esp + 0x60]
fmul qword [0x453928]
fstp qword [esp + 0x58]
fcom qword [esp + 0x30]
fnstsw ax
test ah, 0x40
je 0x404fb4
fstp st(0)
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
jmp 0x405060
fld qword [esp + 0x58]
fcomp qword [0x453928]
fnstsw ax
fld st(0)
fsub qword [esp + 0x30]
test ah, 1
je 0x404fd3
fld st(0)
fdiv qword [esp + 0x60]
jmp 0x404fe1
fld qword [0x453920]
fsub st(2)
fsub qword [esp + 0x30]
fdivr st(1)
fstp qword [esp + 0x48]
fstp qword [esp + 0x38]
fld qword [esp + 0x40]
fcomp st(1)
fnstsw ax
test ah, 0x40
je 0x405006
fstp st(0)
fld qword [esp + 0x28]
fsub qword [esp + 0x10]
fdiv qword [esp + 0x38]
jmp 0x40503b
fld qword [esp + 0x28]
fcomp st(1)
fnstsw ax
test ah, 0x40
fstp st(0)
je 0x405029
fld qword [esp + 0x10]
fsub qword [esp + 0x40]
fdiv qword [esp + 0x38]
fadd qword [0x453920]
jmp 0x40503b
fld qword [esp + 0x40]
fsub qword [esp + 0x28]
fdiv qword [esp + 0x38]
fadd qword [0x453918]
fmul qword [0x453910]
fst qword [esp + 0x38]
fcomp qword [0x4537a0]
fnstsw ax
test ah, 1
je 0x405060
fld qword [esp + 0x38]
fadd qword [0x453908]
fstp qword [esp + 0x38]
fld qword [esp + 0x58]
fmul qword [0x453900]
fadd qword [esp + 0x58]
fcom qword [0x4537a0]
fnstsw ax
test ah, 0x41
je 0x405085
fstp st(0)
fld qword [0x4537a0]
jmp 0x40509a
fcom qword [0x453908]
fnstsw ax
test ah, 1
jne 0x40509a
fstp st(0)
fld qword [0x453908]
fld qword [esp + 0x48]
fcomp qword [0x4537a0]
fnstsw ax
test ah, 0x40
je 0x4050b8
fst qword [esp + 0x58]
fst qword [esp + 0x60]
jmp 0x405207
fcom qword [0x453928]
fnstsw ax
test ah, 0x41
je 0x4050d3
fld qword [esp + 0x48]
fadd qword [0x453908]
fmul st(1)
jmp 0x4050e1
fld st(0)
fadd qword [esp + 0x48]
fld st(1)
fmul qword [esp + 0x48]
fsubp st(1)
fstp qword [esp + 0x10]
fadd st(0), st(0)
fsub qword [esp + 0x10]
fstp qword [esp + 0x28]
fld qword [esp + 0x38]
fadd qword [0x4538f8]
fcom qword [0x4537a0]
fnstsw ax
test ah, 1
je 0x40510c
fadd qword [0x453908]
fcom qword [0x453908]
fnstsw ax
test ah, 0x41
jne 0x40511f
fsub qword [0x453908]
fld st(0)
fmul qword [0x4538f0]
fcomp qword [0x453908]
fnstsw ax
test ah, 1
je 0x405140
fld qword [esp + 0x10]
fsub qword [esp + 0x28]
fmul st(1)
jmp 0x40518c
fld st(0)
fadd st(0), st(0)
fcomp qword [0x453908]
fnstsw ax
test ah, 1
je 0x405165
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
fstp st(0)
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], ecx
jmp 0x4051b0
fld st(0)
fmul qword [0x4538e8]
fcomp qword [0x453920]
fnstsw ax
test ah, 1
je 0x40519e
fld qword [esp + 0x10]
fsub qword [esp + 0x28]
fld qword [0x4538e0]
fsub st(2)
fmulp st(1)
fmul qword [0x4538f0]
fadd qword [esp + 0x28]
fstp qword [esp + 0x50]
fstp st(0)
jmp 0x4051b0
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
fstp st(0)
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], eax
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x30]
push edx
mov edx, dword [esp + 0x30]
push ebx
push eax
push ecx
push edx
call fcn.00405700
fstp qword [esp + 0x78]
fld qword [esp + 0x50]
fsub qword [0x4538f8]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x40]
add esp, 0x10
fstp qword [esp]
push ebx
push eax
push ecx
push edx
call fcn.00405700
fstp qword [esp + 0x70]
fld qword [esp + 0x68]
add esp, 0x18
fmul qword [0x4538d8]
fld qword [esp + 0x60]
fmul qword [0x4538d8]
fld qword [esp + 0x58]
fmul qword [0x4538d8]
fld st(2)
call fcn.004331b8
and eax, 0xff
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fsubr st(3)
fcomp qword [0x453928]
fnstsw ax
test ah, 0x41
jne 0x40524e
fxch st(2)
fadd qword [0x453908]
fxch st(2)
fld st(1)
call fcn.004331b8
and eax, 0xff
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fsubr st(2)
fcomp qword [0x453928]
fnstsw ax
test ah, 0x41
jne 0x40527b
fxch st(1)
fadd qword [0x453908]
fxch st(1)
fld st(0)
call fcn.004331b8
and eax, 0xff
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fsubr st(1)
fcomp qword [0x453928]
fnstsw ax
test ah, 0x41
jne 0x4052a4
fadd qword [0x453908]
call fcn.004331b8
xor ebx, ebx
mov bh, al
call fcn.004331b8
mov bl, al
shl ebx, 8
call fcn.004331b8
and eax, 0xff
or ebx, eax
mov eax, dword [esp + 0xc]
push ebx
push esi
push eax
push edi
call dword [sym.imp.GDI32.dll_SetPixel]
mov ebx, dword [esp + 0xc]
mov eax, dword [esp + 0x6c]
inc esi
cmp esi, eax
jl 0x404dde
mov ecx, dword [esp + 0x70]
inc ebx
cmp ebx, ecx
mov dword [esp + 0xc], ebx
jl 0x404dd4
mov ecx, dword [esp + 0x1c]
push ecx
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
push edi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov edx, dword [esp + 0x20]
push edx
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
imul eax, edx
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x404da3
mov eax, dword [esp + 0x74]
push edi
imul eax, dword [esp + 0x74]
push eax
push esi
call dword [sym.imp.GDI32.dll_GetBitmapBits]
test eax, eax
jne 0x405358
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x70]
xor ebx, ebx
test ecx, ecx
jle 0x4056d4
mov eax, dword [esp + 0x6c]
mov dword [esp + 0xc], 0
test eax, eax
jle 0x4056c8
mov ecx, dword [esp + 0xc]
mov edx, ebx
imul edx, dword [esp + 0x74]
lea esi, [ecx*4]
mov cl, byte [ebp + 0xc]
add edx, esi
test cl, cl
lea eax, [edx + edi]
mov dword [esp + 0x1c], eax
mov eax, dword [eax]
jne 0x40543c
xor ecx, ecx
mov edx, eax
mov cl, ah
and eax, 0xff
and ecx, 0xff
mov dword [esp + 0x20], ecx
fild dword [esp + 0x20]
shr edx, 0x10
and edx, 0xff
fmul qword [0x453948]
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
mov dword [esp + 0x20], eax
fmul qword [0x453940]
faddp st(1)
fild dword [esp + 0x20]
fmul qword [0x453938]
faddp st(1)
call fcn.004331b8
mov ecx, dword [esp + 0x1c]
mov edx, ebx
mov byte [ecx], al
imul edx, dword [esp + 0x74]
add edx, esi
mov ecx, ebx
mov byte [edx + edi + 1], al
imul ecx, dword [esp + 0x74]
add ecx, esi
mov edx, ebx
mov byte [ecx + edi + 2], al
imul edx, dword [esp + 0x74]
add edx, esi
xor eax, eax
mov al, byte [edx + edi + 3]
lea esi, [edx + edi + 3]
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
fmul qword [str.333333]
call fcn.004331b8
mov byte [esi], al
jmp 0x4056af
cmp cl, 1
jne 0x4056af
mov ecx, eax
xor edx, edx
and ecx, 0xff
mov dl, ah
mov dword [esp + 0x20], ecx
and edx, 0xff
fild dword [esp + 0x20]
mov dword [esp + 0x20], edx
shr eax, 0x10
fmul qword [0x453930]
and eax, 0xff
fstp qword [esp + 0x40]
fild dword [esp + 0x20]
mov dword [esp + 0x20], eax
fmul qword [0x453930]
fstp qword [esp + 0x28]
fild dword [esp + 0x20]
fmul qword [0x453930]
fstp qword [esp + 0x20]
fld qword [esp + 0x28]
fcomp qword [esp + 0x20]
fnstsw ax
test ah, 0x41
jne 0x4054aa
fld qword [esp + 0x28]
jmp 0x4054ae
fld qword [esp + 0x20]
fld qword [esp + 0x40]
fcomp st(1)
fnstsw ax
test ah, 0x41
fstp st(0)
jne 0x4054c3
fld qword [esp + 0x40]
jmp 0x4054dc
fld qword [esp + 0x28]
fcomp qword [esp + 0x20]
fnstsw ax
test ah, 0x41
jne 0x4054d8
fld qword [esp + 0x28]
jmp 0x4054dc
fld qword [esp + 0x20]
fld qword [esp + 0x28]
fcomp qword [esp + 0x20]
fnstsw ax
test ah, 1
je 0x4054f1
fld qword [esp + 0x28]
jmp 0x4054f5
fld qword [esp + 0x20]
fld qword [esp + 0x40]
fcomp st(1)
fnstsw ax
test ah, 1
fstp st(0)
je 0x405516
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
jmp 0x405547
fld qword [esp + 0x28]
fcomp qword [esp + 0x20]
fnstsw ax
test ah, 1
je 0x405537
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], eax
jmp 0x405547
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], edx
fld qword [esp + 0x30]
fadd st(1)
fst qword [esp + 0x60]
fmul qword [0x453928]
fstp qword [esp + 0x48]
fcom qword [esp + 0x30]
fnstsw ax
test ah, 0x40
je 0x40558d
fstp st(0)
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
jmp 0x405639
fld qword [esp + 0x48]
fcomp qword [0x453928]
fnstsw ax
fld st(0)
fsub qword [esp + 0x30]
test ah, 1
je 0x4055ac
fld st(0)
fdiv qword [esp + 0x60]
jmp 0x4055ba
fld qword [0x453920]
fsub st(2)
fsub qword [esp + 0x30]
fdivr st(1)
fstp qword [esp + 0x38]
fstp qword [esp + 0x58]
fld qword [esp + 0x40]
fcomp st(1)
fnstsw ax
test ah, 0x40
je 0x4055df
fstp st(0)
fld qword [esp + 0x28]
fsub qword [esp + 0x20]
fdiv qword [esp + 0x58]
jmp 0x405614
fld qword [esp + 0x28]
fcomp st(1)
fnstsw ax
test ah, 0x40
fstp st(0)
je 0x405602
fld qword [esp + 0x20]
fsub qword [esp + 0x40]
fdiv qword [esp + 0x58]
fadd qword [0x453920]
jmp 0x405614
fld qword [esp + 0x40]
fsub qword [esp + 0x28]
fdiv qword [esp + 0x58]
fadd qword [0x453918]
fmul qword [0x453910]
fst qword [esp + 0x50]
fcomp qword [0x4537a0]
fnstsw ax
test ah, 1
je 0x405639
fld qword [esp + 0x50]
fadd qword [0x453908]
fstp qword [esp + 0x50]
fld qword [esp + 0x48]
fmul qword [0x453900]
fadd qword [esp + 0x48]
fcom qword [0x4537a0]
fnstsw ax
test ah, 0x41
je 0x40565e
fstp st(0)
fld qword [0x4537a0]
jmp 0x405673
fcom qword [0x453908]
fnstsw ax
test ah, 1
jne 0x405673
fstp st(0)
fld qword [0x453908]
fstp qword [esp + 0x48]
lea eax, [esp + 0x48]
lea ecx, [esp + 0x38]
push eax
lea edx, [esp + 0x54]
push ecx
push edx
call fcn.004057b0
mov dword [esp + 0x1c], eax
mov eax, ebx
imul eax, dword [esp + 0x80]
mov cx, word [esp + 0x1c]
mov dl, byte [esp + 0x1e]
add eax, esi
add esp, 0xc
add eax, edi
mov word [eax], cx
mov byte [eax + 2], dl
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x6c]
inc eax
cmp eax, ecx
mov dword [esp + 0xc], eax
jl 0x40537a
mov ecx, dword [esp + 0x70]
inc ebx
cmp ebx, ecx
jl 0x405366
mov esi, dword [ebp + 8]
mov eax, dword [esp + 0x74]
push edi
imul eax, ecx
push eax
push esi
call dword [sym.imp.GDI32.dll_SetBitmapBits]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret