Function at 0x415360
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x423a18
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
push ebx
push esi
mov esi, ecx
push edi
xor ebx, ebx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x30], esi
mov dword [esi + 4], ebx
mov eax, dword [ebp + 8]
mov dword [ebp - 4], ebx
push 0x428
mov dword [esi], 0x4248e0
mov dword [esi + 0x24], eax
mov dword [esi + 0x30], ebx
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
mov dword [esi + 0x18], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov byte [ebp - 4], 1
call fcn.0041ab13
add esp, 4
cmp eax, ebx
mov dword [esi + 8], eax
jne 0x4153e5
lea ecx, [ebp - 0x14]
push 0x425078
push ecx
mov dword [ebp - 0x14], str.Out_of_memory_in_win32_windowed_NES_screen_mgr::win32_windowed_NES_screen_mgr
call fcn.0041a4ef
push 0x404
call fcn.0041ab13
add esp, 4
cmp eax, ebx
mov dword [esi + 0xc], eax
jne 0x41540e
lea edx, [ebp - 0x18]
push 0x425078
push edx
mov dword [ebp - 0x18], str.Out_of_memory_in_win32_windowed_NES_screen_mgr::win32_windowed_NES_screen_mgr
call fcn.0041a4ef
mov edi, dword [esi + 8]
mov ecx, 0xa
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [esi + 8]
mov edi, 0x100
mov dword [eax], 0x28
mov ecx, dword [esi + 8]
mov eax, pe_nt_image_headers32
cdq
xor eax, edx
mov dword [ecx + 4], 0x220
sub eax, edx
mov edx, dword [esi + 8]
neg eax
shl eax, 1
mov dword [edx + 8], eax
mov eax, dword [esi + 8]
mov word [eax + 0xc], 1
mov ecx, dword [esi + 8]
mov word [ecx + 0xe], 8
mov edx, dword [esi + 8]
mov dword [edx + 0x10], ebx
mov eax, dword [esi + 8]
mov dword [eax + 0x14], ebx
mov ecx, dword [esi + 8]
mov dword [ecx + 0x18], ebx
mov edx, dword [esi + 8]
mov dword [edx + 0x1c], ebx
mov eax, dword [esi + 8]
mov dword [eax + 0x20], edi
mov ecx, dword [esi + 8]
mov dword [ecx + 0x24], edi
mov edx, dword [esi + 0xc]
mov word [edx], 0x300
mov eax, dword [esi + 0xc]
mov word [eax + 2], di
xor eax, eax
mov ecx, dword [esi + 0xc]
cmp eax, edi
jge 0x4154e2
mov byte [ecx + eax*4 + 4], bl
mov edx, dword [esi + 0xc]
mov byte [edx + eax*4 + 5], bl
mov ecx, dword [esi + 0xc]
mov byte [ecx + eax*4 + 6], bl
mov edx, dword [esi + 0xc]
mov byte [edx + eax*4 + 7], 4
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 8]
mov cl, byte [ecx + eax*4 + 4]
mov byte [edx + eax*4 + 0x2a], cl
mov edx, dword [esi + 0xc]
mov ecx, dword [esi + 8]
mov dl, byte [edx + eax*4 + 5]
mov byte [ecx + eax*4 + 0x29], dl
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 8]
mov cl, byte [ecx + eax*4 + 6]
mov byte [edx + eax*4 + 0x28], cl
mov edx, dword [esi + 8]
mov byte [edx + eax*4 + 0x2b], bl
inc eax
jmp 0x41548d
mov al, 0xff
mov byte [ecx + 0x400], al
mov edx, dword [esi + 0xc]
mov byte [edx + 0x401], al
mov ecx, dword [esi + 0xc]
mov byte [ecx + 0x402], al
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 8]
mov cl, byte [edx + 0x400]
mov byte [eax + 0x426], cl
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 8]
mov cl, byte [edx + 0x401]
mov byte [eax + 0x425], cl
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 8]
mov cl, byte [edx + 0x402]
mov byte [eax + 0x424], cl
xor eax, eax
mov cl, 2
cmp eax, 0xa
jge 0x415587
mov edx, dword [esi + 0xc]
mov byte [edx + eax*4 + 4], al
mov edi, dword [esi + 0xc]
mov dl, al
sub dl, 0xa
mov byte [edi + eax*4 + 0x3dc], dl
mov edx, dword [esi + 0xc]
mov byte [edx + eax*4 + 0x3de], bl
mov edx, dword [esi + 0xc]
mov byte [edx + eax*4 + 0x3dd], bl
mov edx, dword [esi + 0xc]
mov byte [edx + eax*4 + 6], bl
mov edx, dword [esi + 0xc]
mov byte [edx + eax*4 + 5], bl
mov edx, dword [esi + 0xc]
mov byte [edx + eax*4 + 0x3df], cl
mov edx, dword [esi + 0xc]
mov byte [edx + eax*4 + 7], cl
inc eax
jmp 0x415536
mov eax, dword [esi + 0x24]
push eax
call dword [sym.imp.USER32.dll_GetDC]
cmp eax, ebx
mov dword [esi + 0x10], eax
jne 0x4155ad
lea ecx, [ebp - 0x1c]
push 0x425078
push ecx
mov dword [ebp - 0x1c], str.GetDC_failed_in_win32_windowed_NES_screen_mgr::win32_windowed_NES_screen_mgr
call fcn.0041a4ef
mov edx, dword [esi + 0xc]
push edx
call dword [sym.imp.GDI32.dll_CreatePalette]
cmp eax, ebx
mov dword [esi + 0x18], eax
jne 0x4155d3
lea eax, [ebp - 0x20]
push 0x425078
push eax
mov dword [ebp - 0x20], str.CreatePalette_failed_in_win32_windowed_NES_screen_mgr::win32_windowed_NES_screen_mgr
call fcn.0041a4ef
mov ecx, dword [esi + 0x10]
push ebx
push eax
push ecx
call dword [sym.imp.GDI32.dll_SelectPalette]
cmp eax, ebx
mov dword [esi + 0x1c], eax
jne 0x4155fb
lea edx, [ebp - 0x24]
push 0x425078
push edx
mov dword [ebp - 0x24], str.SelectPalette_failed_in_win32_windowed_NES_screen_mgr::win32_windowed_NES_screen_mgr
call fcn.0041a4ef
mov eax, dword [esi + 0x10]
push eax
call dword [sym.imp.GDI32.dll_RealizePalette]
cmp eax, 0xffffffff
jne 0x41561f
lea ecx, [ebp - 0x28]
push 0x425078
push ecx
mov dword [ebp - 0x28], str.RealizePalette_failed_in_win32_windowed_NES_screen_mgr::win32_windowed_NES_screen_mgr
call fcn.0041a4ef
mov edx, dword [esi + 0x18]
push edx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0x10]
push ebx
lea eax, [esi + 0x2c]
push ebx
push eax
push ebx
push ecx
push edx
mov dword [esi + 0x18], ebx
call dword [sym.imp.GDI32.dll_CreateDIBSection]
cmp eax, ebx
mov dword [esi + 0x28], eax
jne 0x41565d
lea eax, [ebp - 0x2c]
push 0x425078
push eax
mov dword [ebp - 0x2c], str.CreateDIBSection_failed_in_win32_windowed_NES_screen_mgr::win32_windowed_NES_screen_mgr
call fcn.0041a4ef
mov eax, dword [esi + 0x10]
cmp eax, ebx
je 0x415672
mov ecx, dword [esi + 0x24]
push eax
push ecx
call dword [sym.imp.USER32.dll_ReleaseDC]
mov dword [esi + 0x10], ebx
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4