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

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea edi, [esi + 0x2cf4]
push edi
mov dword [esp + 0x34], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor ebx, ebx
push 1
push 0x4735c0
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ebx
call fcn.0042b430
mov ebp, eax
add esp, 8
cmp ebp, ebx
mov dword [esp + 0x2c], ebp
je 0x421f2d
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4735a4
push ebp
call edi
cmp eax, ebx
mov dword [esp + 0x28], eax
jne 0x421d67
push 0x47358c
push ebp
call edi
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x1564]
cmp eax, ebx
je 0x421d7a
push eax
call fcn.00451f5e
add esp, 4
push 0x9c
call fcn.00451b7b
add esp, 4
cmp eax, ebx
mov dword [esi + 0x1564], eax
je 0x421f1e
push ebx
call dword [sym.imp.USER32.dll_GetDC]
push ebx
mov ebx, dword [sym.imp.USER32.dll_GetSystemMetrics]
mov edi, eax
call ebx
push 1
mov ebp, eax
call ebx
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x1c], eax
cmp ebp, ecx
jne 0x421ded
cmp eax, dword [esp + 0x3c]
jne 0x421ded
mov eax, dword [esi + 0x1564]
xor ebx, ebx
cmp eax, ebx
je 0x421dd4
push eax
call fcn.00451f5e
add esp, 4
push edi
push ebx
mov dword [esi + 0x1564], ebx
mov dword [esi + 0x1570], ebx
call dword [sym.imp.USER32.dll_ReleaseDC]
jmp 0x421f1e
mov ebx, dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 0xc
push edi
call ebx
push 0x74
push edi
mov dword [esp + 0x28], eax
call ebx
xor ebx, ebx
push edi
push ebx
mov dword [esp + 0x2c], eax
call dword [sym.imp.USER32.dll_ReleaseDC]
mov ecx, dword [esi + 0x1564]
mov edi, dword [sym.imp.USER32.dll_EnumDisplaySettingsA]
mov eax, dword [esp + 0x10]
push ecx
push eax
push ebx
call edi
mov ecx, dword [esi + 0x1564]
cmp dword [ecx + 0x6c], ebp
jne 0x421e4a
mov edx, dword [esp + 0x1c]
cmp dword [ecx + 0x70], edx
jne 0x421e4a
mov edx, dword [esp + 0x20]
cmp dword [ecx + 0x68], edx
jne 0x421e4a
mov edx, dword [esp + 0x24]
cmp dword [ecx + 0x78], edx
je 0x421e57
mov edx, dword [esp + 0x10]
inc edx
cmp eax, ebx
mov dword [esp + 0x10], edx
jne 0x421e1b
mov eax, dword [esi + 0x1564]
mov edi, dword [esp + 0x28]
cmp edi, ebx
mov ecx, dword [eax + 0x6c]
mov dword [esi + 0x1568], ecx
mov edx, dword [eax + 0x70]
mov ecx, dword [esp + 0x38]
mov dword [esi + 0x156c], edx
mov dword [eax + 0x6c], ecx
mov edx, dword [esi + 0x1564]
mov eax, dword [esp + 0x3c]
mov dword [edx + 0x70], eax
je 0x421ecd
mov ecx, dword [esi + 0x1564]
push ebx
push 2
push ebx
push ecx
push ebx
call edi
test eax, eax
jne 0x421ebb
mov edx, dword [esi + 0x1564]
mov ebp, 1
push ebx
push ebp
push ebx
push edx
push ebx
call edi
mov dword [esi + 0x1570], ebp
mov dword [esp + 0x14], ebp
jmp 0x421f1e
mov eax, dword [esi + 0x1564]
mov dword [esi + 0x1570], ebx
cmp eax, ebx
je 0x421f18
jmp 0x421f0f
mov edi, dword [esp + 0x18]
cmp edi, ebx
je 0x421f1e
mov eax, dword [esi + 0x1564]
push 2
push eax
call edi
test eax, eax
jne 0x421eff
mov ecx, dword [esi + 0x1564]
mov ebx, 1
push ebx
push ecx
call edi
mov dword [esi + 0x1570], ebx
mov dword [esp + 0x14], ebx
jmp 0x421f1e
mov eax, dword [esi + 0x1564]
mov dword [esi + 0x1570], ebx
cmp eax, ebx
je 0x421f18
push eax
call fcn.00451f5e
add esp, 4
mov dword [esi + 0x1564], ebx
mov edx, dword [esp + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edi, dword [esp + 0x30]
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 8