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

Disassembly:
sub esp, 0xbc
push edi
mov edi, dword [esp + 0xc4]
test edi, edi
je 0x451f98
mov al, byte [edi + 0x328]
push ebx
push ebp
push esi
test al, al
jne 0x451d5f
push 0x1b9
mov byte [edi + 0x328], 1
call fcn.004486f0
mov ebp, dword [edi]
mov dword [edi + 4], eax
push 0x1b9
mov esi, dword [ebp]
call fcn.00448e40
push 0
call fcn.00459b70
push 1
call fcn.00459850
mov eax, dword [esi + 0x34]
mov ecx, dword [esi + 0x30]
push eax
push ecx
call fcn.0045a4e0
mov esi, dword [ebp]
mov edx, dword [0x50deb4]
mov ecx, dword [esi + 0x2c]
mov eax, dword [esi + 0x28]
mov ebx, dword [edx + 0x6c]
add ecx, 8
add eax, 8
push ebx
push ecx
push eax
lea eax, [esp + 0x6c]
mov byte [esp + 0x36], 0
push eax
call fcn.004478b0
xor edx, edx
cmp ebx, 8
setne dl
dec edx
lea ecx, [esp + 0x70]
and edx, 8
push ecx
or edx, 0x40000021
push edx
push 1
call fcn.0044ba90
add esp, 0x34
mov dword [esi + 0x40], eax
test eax, eax
jne 0x451d4b
mov eax, dword [0x51a938]
push str._To_restore_the_window_background_
push eax
call fcn.00441cd0
add esp, 8
lea ecx, [esp + 0x12]
push ecx
push ebp
call fcn.00453dc0
push ebp
call fcn.00451fa0
add esp, 0xc
mov edi, dword [edi]
mov dword [esp + 0x34], edi
mov esi, dword [edi]
mov al, byte [esi + 2]
test al, al
jne 0x451d8e
push 0
push 2
mov dword [0x51d090], 0x50ffdc
mov dword [0x51d094], 0x7c8
call fcn.00449f60
add esp, 8
mov bl, byte [esi + 1]
mov byte [esp + 0x13], bl
call fcn.00459210
mov edx, dword [0x50deb4]
mov byte [esp + 0x20], al
add edx, 0x48
mov eax, dword [edx]
mov dword [esp + 0x24], eax
mov ecx, dword [edx + 4]
mov dword [esp + 0x28], ecx
mov eax, dword [edx + 8]
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 0x30]
mov ecx, dword [edx + 0xc]
mov edx, dword [esi + 0x34]
push edx
push eax
mov dword [esp + 0x38], ecx
call fcn.0045a4e0
mov al, byte [esi + 9]
add esp, 8
test al, al
je 0x451dfd
lea ecx, [esp + 0x12]
mov byte [esp + 0x12], 1
push ecx
push edi
call fcn.00453dc0
mov al, byte [esp + 0x1a]
add esp, 8
test al, al
je 0x451dfd
mov byte [esp + 0x13], 1
mov bl, byte [esp + 0x13]
mov eax, dword [0x51d964]
mov ecx, dword [0x51d968]
mov edx, dword [0x51d960]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ecx
mov ecx, dword [0x50deb4]
lea eax, [esp + 0x38]
mov dword [esp + 0x38], edx
mov edx, dword [0x51d96c]
push eax
push ecx
mov dword [esp + 0x4c], edx
call fcn.00447860
add esp, 8
test bl, bl
je 0x451e48
push 0
call fcn.00459080
add esp, 4
jmp 0x451e51
test byte [esi + 0xe8], 0x40
je 0x451e8f
lea edx, [esi + 0xc4]
push edx
call fcn.00475b80
mov eax, dword [esi + 0x34]
mov edx, dword [esi + 0x2c]
mov ecx, dword [esi + 0x30]
push 8
lea edx, [edx + eax - 1]
push 8
push edx
mov edx, dword [esi + 0x28]
lea edx, [edx + ecx - 1]
push edx
push eax
push ecx
call fcn.00475650
mov eax, dword [esi + 0xe8]
add esp, 0x1c
and al, 0xbf
mov dword [esi + 0xe8], eax
mov eax, dword [esi + 0x78]
mov dword [esp + 0x18], 0
test eax, eax
jbe 0x451f3e
lea eax, [esi + 0x80]
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x14]
test bl, bl
mov ebp, dword [ecx]
jne 0x451ebc
test byte [ebp + 0x24], 0x40
je 0x451ecd
push ebp
call fcn.00475c20
mov eax, dword [ebp + 0x24]
add esp, 4
and al, 0xbf
mov dword [ebp + 0x24], eax
mov eax, dword [ebp + 0x40]
mov dword [esp + 0x1c], 0
test eax, eax
jbe 0x451f1f
lea ebx, [ebp + 0x48]
mov al, byte [esp + 0x13]
mov edi, dword [ebx]
test al, al
jne 0x451eef
test byte [edi + 0x24], 0x40
je 0x451f04
lea edx, [edi + 0x40]
push edx
push edi
call fcn.00476250
mov eax, dword [edi + 0x24]
add esp, 8
and al, 0xbf
mov dword [edi + 0x24], eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebp + 0x40]
inc eax
add ebx, 4
cmp eax, ecx
mov dword [esp + 0x1c], eax
jb 0x451edf
mov bl, byte [esp + 0x13]
mov edi, dword [esp + 0x34]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
mov ecx, dword [esi + 0x78]
inc eax
add edx, 4
cmp eax, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], edx
jb 0x451eac
test bl, bl
je 0x451f4f
mov eax, dword [esp + 0x20]
push eax
call fcn.00459080
add esp, 4
mov al, byte [esi + 9]
test al, al
je 0x451f69
mov eax, dword [esi + 0x14]
test eax, eax
je 0x451f69
push 0
push 0
push 0
push edi
call eax
add esp, 0x10
mov ecx, dword [0x50deb4]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
add ecx, 0x48
mov dword [ecx], edx
mov edx, dword [esp + 0x2c]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x30]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
mov byte [esi + 1], 0
mov byte [esi + 9], 0
pop esi
pop ebp
pop ebx
pop edi
add esp, 0xbc
ret