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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xac
fld qword [esp + 0xc4]
fstp qword [esp + 0x70]
fld qword [esp + 0xcc]
fstp qword [esp + 0x68]
fld qword [esp + 0xd4]
fstp qword [esp + 0x60]
movzx esi, byte [esp + 0xec]
mov edi, dword [0x50102c]
test edi, edi
je 0x405370
mov eax, dword [0x501034]
or ah, 1
mov dword [0x501034], eax
mov dword [esp], 0x501020
call sym._PrintDlgA_4
push edx
test eax, eax
jne 0x4053b8
add esp, 0xac
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [0x501028]
test ebx, ebx
jne 0x405345
mov edx, 0x501020
mov ecx, 0x42
xor eax, eax
mov edi, edx
rep stosb byte es:[edi], al
mov dword [0x501020], 0x42
mov dword [0x501034], 0x400
mov dword [esp], edx
call sym._PrintDlgA_4
push ecx
test eax, eax
je 0x405363
mov eax, dword [0x501034]
and ah, 0xfb
jmp 0x40534a
mov eax, dword [esp + 0xf0]
test eax, eax
je 0x4057e8
mov dword [esp + 4], 0xffffffeb
mov eax, dword [esp + 0xf0]
mov dword [esp], eax
call sym._GetWindowLongA_8
sub esp, 8
mov ebx, eax
mov dword [esp + 4], 0x1388
mov eax, dword [eax + 0x304]
mov dword [esp], eax
call sym._WaitForSingleObject_8
sub esp, 8
mov eax, esi
test al, al
jne 0x4056ec
mov eax, dword [ebx + 0xbc]
mov edi, dword [ebx + eax*4 + 0x9c]
mov eax, dword [esp + 0xdc]
test eax, eax
js 0x405700
mov eax, dword [ebx]
cmp dword [esp + 0xdc], eax
jl 0x405435
dec eax
mov dword [esp + 0xdc], eax
mov eax, dword [esp + 0xe4]
test eax, eax
js 0x405720
mov eax, dword [ebx]
mov ecx, dword [esp + 0xe4]
cmp ecx, eax
jle 0x405453
mov ecx, eax
mov ebp, dword [esp + 0xe8]
test ebp, ebp
js 0x405718
mov esi, dword [ebx + 4]
mov eax, dword [esp + 0xe8]
cmp eax, esi
jle 0x405472
mov eax, esi
mov esi, dword [esp + 0xe0]
test esi, esi
js 0x405710
mov esi, dword [ebx + 4]
mov edx, dword [esp + 0xe0]
cmp edx, esi
jle 0x405491
mov edx, esi
sub ecx, dword [esp + 0xdc]
js 0x405730
inc ecx
mov dword [esp + 0x4c], ecx
sub eax, edx
js 0x405728
inc eax
mov dword [esp + 0x58], eax
mov dword [esp], edi
mov dword [esp + 0x3c], edx
call sym._CreateCompatibleDC_4
push edx
mov esi, eax
mov eax, dword [esp + 0x58]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 4], eax
mov dword [esp], edi
call sym._CreateCompatibleBitmap_12
sub esp, 0xc
mov ebp, eax
mov dword [esp + 4], eax
mov dword [esp], esi
call sym._SelectObject_8
sub esp, 8
mov dword [esp + 0x5c], eax
mov dword [esp + 4], ebp
mov dword [esp], esi
call sym._SelectObject_8
sub esp, 8
mov dword [esp + 0x20], 0xcc0020
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x1c], edx
mov eax, dword [esp + 0xdc]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], edi
mov eax, dword [esp + 0x58]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
call sym._BitBlt_36
sub esp, 0x24
mov dword [esp + 4], 0x58
mov eax, dword [0x501030]
mov dword [esp], eax
call sym._GetDeviceCaps_8
sub esp, 8
mov dword [esp + 0x40], eax
mov dword [esp + 4], 0x5a
mov eax, dword [0x501030]
mov dword [esp], eax
call sym._GetDeviceCaps_8
sub esp, 8
mov dword [esp + 0x50], eax
lea edx, [esp + 0x8c]
mov ecx, 0x14
xor eax, eax
mov edi, edx
rep stosb byte es:[edi], al
mov dword [esp + 0x8c], 0x14
mov dword [esp + 0x90], 0x4ec12e
mov dword [esp + 4], edx
mov eax, dword [0x501030]
mov dword [esp], eax
call sym._StartDocA_8
sub esp, 8
inc eax
je 0x4056aa
mov eax, dword [0x501030]
mov dword [esp], eax
call sym._StartPage_4
push eax
mov eax, dword [esp + 0xc0]
test eax, eax
je 0x405800
fild dword [esp + 0x40]
fstp qword [esp + 0x40]
fild dword [esp + 0x50]
fst qword [esp + 0x50]
xor eax, eax
mov ecx, 0xffffffff
mov edi, dword [esp + 0xc0]
repne scasb al, byte es:[edi]
not ecx
dec ecx
test ecx, ecx
jle 0x40566c
mov dword [esp + 0x10], ecx
mov eax, dword [esp + 0xc0]
mov dword [esp + 0xc], eax
fmul qword [esp + 0x60]
fnstcw word [esp + 0x7a]
mov ax, word [esp + 0x7a]
mov ah, 0xc
mov word [esp + 0x78], ax
fldcw word [esp + 0x78]
fistp dword [esp + 8]
fldcw word [esp + 0x7a]
fld qword [esp + 0x40]
fmul qword [esp + 0x68]
fldcw word [esp + 0x78]
fistp dword [esp + 4]
fldcw word [esp + 0x7a]
mov eax, dword [0x501030]
mov dword [esp], eax
call sym._TextOutA_20
sub esp, 0x14
fld qword [esp + 0x60]
fadd dword [0x4ec158]
fstp qword [esp + 0x60]
jmp 0x40566e
fstp st(0)
mov dword [esp + 4], 0x26
mov eax, dword [0x501030]
mov dword [esp], eax
call sym._GetDeviceCaps_8
sub esp, 8
test al, 1
jne 0x405738
mov eax, dword [0x501030]
mov dword [esp], eax
call sym._EndPage_4
push eax
mov eax, dword [0x501030]
mov dword [esp], eax
call sub.GDI32.dll_EndDoc
push eax
mov eax, dword [ebx + 0x304]
mov dword [esp], eax
call sym._ReleaseMutex_4
push ebx
mov eax, dword [esp + 0x5c]
mov dword [esp + 4], eax
mov dword [esp], esi
call sym._SelectObject_8
sub esp, 8
mov dword [esp], ebp
call sym._DeleteObject_4
push edi
mov dword [esp], esi
call sym._DeleteDC_4
push ebp
add esp, 0xac
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx + 0xc0]
mov edi, dword [ebx + eax*4 + 0x9c]
jmp 0x405413
mov dword [esp + 0xdc], 0
jmp 0x405435
xor edx, edx
jmp 0x405491
xor eax, eax
jmp 0x405472
xor ecx, ecx
jmp 0x405453
neg eax
jmp 0x4054ab
neg ecx
jmp 0x40549e
fild dword [esp + 0x4c]
fld qword [esp + 0x40]
fmul qword [esp + 0x70]
fdiv st(1)
mov dword [esp + 0x28], 0xcc0020
mov eax, dword [esp + 0x58]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], esi
fld qword [esp + 0x50]
fmul st(1)
fdiv qword [esp + 0x40]
fimul dword [esp + 0x58]
fnstcw word [esp + 0x7a]
mov ax, word [esp + 0x7a]
mov ah, 0xc
mov word [esp + 0x78], ax
fldcw word [esp + 0x78]
fistp dword [esp + 0x10]
fldcw word [esp + 0x7a]
fmulp st(1)
fldcw word [esp + 0x78]
fistp dword [esp + 0xc]
fldcw word [esp + 0x7a]
fld qword [esp + 0x60]
fmul qword [esp + 0x50]
fldcw word [esp + 0x78]
fistp dword [esp + 8]
fldcw word [esp + 0x7a]
fld qword [esp + 0x40]
fmul qword [esp + 0x68]
fldcw word [esp + 0x78]
fistp dword [esp + 4]
fldcw word [esp + 0x7a]
mov eax, dword [0x501030]
mov dword [esp], eax
call sym._StretchBlt_44
sub esp, 0x2c
jmp 0x40568e
mov eax, dword [0x4eb200]
test eax, eax
js 0x4057f9
cmp eax, dword [0x5011a4]
jl 0x405810
call sym.BGI__GetWindowDataPtr_HWND_____clone_.part.1_
nop
mov eax, dword [ebx + 0x10]
mov dword [esp + 0xc0], eax
jmp 0x4055e0
mov edx, dword [0x5011a8]
mov edx, dword [edx + eax*4]
mov dword [esp + 0xf0], edx
test edx, edx
jne 0x4053c7
jmp 0x4057f9