Function at 0x501aec
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
push esi
push edi
je 0x501d93
mov edi, dword [ebp + 0xc]
call fcn.0042ad00
test eax, eax
je 0x501d93
push 1
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_SetMapMode]
push 1
push 0x42c
mov dword [ebp - 0x10], eax
xor esi, esi
call fcn.00511988
mov edi, eax
cmp edi, ebx
pop ecx
pop ecx
jne 0x501b4e
push 0x42c
push dword [ebp + 0xc]
push str.:4:LoadCompatibleBitmap___s___FAILED:_calloc__d__1__FAILED.
call fcn.004265da
add esp, 0xc
jmp 0x501d40
push 0x2010
push ebx
push ebx
push ebx
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.USER32.dll_LoadImageA]
cmp eax, ebx
mov dword [ebp - 0xc], eax
jne 0x501b81
push str._GetLastError_
push dword [ebp + 0xc]
push str.:4:LoadCompatibleBitmap___FAILED:_LoadImage___s___FAILED:__s
call fcn.004265da
add esp, 0xc
jmp 0x501d39
push ebx
push edi
push ebx
push ebx
push ebx
push eax
push dword [ebp + 8]
mov dword [edi], 0x28
call dword [sym.imp.GDI32.dll_GetDIBits]
test eax, eax
jne 0x501bac
push str._GetLastError_
push dword [ebp + 0xc]
push str.:8:LoadCompatibleBitmap___s___FAILED:_GetDIBits___FAILED_to_obtain_the_bitmap_properties:__s
jmp 0x501c98
push 0x10
push 1
call fcn.00511988
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x501d30
mov eax, dword [edi + 0x14]
push dword [ebp + 8]
mov dword [ebp - 4], eax
mov ax, word [edi + 4]
mov word [esi + 0xc], ax
mov ax, word [edi + 8]
mov word [esi + 0xe], ax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
cmp eax, ebx
mov dword [esi], eax
je 0x501c5a
movsx eax, word [esi + 0xe]
push eax
movsx eax, word [esi + 0xc]
push eax
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
cmp eax, ebx
mov dword [esi + 4], eax
jne 0x501c2e
movsx eax, word [esi + 0xe]
push str._GetLastError_
push eax
movsx eax, word [esi + 0xc]
push eax
push dword [ebp + 8]
push dword [ebp + 0xc]
push str.:5:LoadCompatibleBitmap___s___FAILED:_CreateCompatibleBitmap__p___d___d__FAILED:__s
call fcn.004265da
add esp, 0x18
push dword [esi]
call dword [sym.imp.GDI32.dll_DeleteDC]
mov dword [esi], ebx
jmp 0x501c70
push eax
push dword [esi]
call dword [sym.imp.GDI32.dll_SelectObject]
cmp eax, ebx
mov dword [esi + 8], eax
jne 0x501c70
push str._GetLastError_
push dword [esi + 4]
push dword [esi]
push dword [ebp + 0xc]
push str.:3:LoadCompatibleBitmap___s___encountered_a_problem:_SelectObject__p___p__FAILED:__s
call fcn.00426c01
add esp, 0x14
jmp 0x501c70
push str._GetLastError_
push ebx
push dword [ebp + 0xc]
push str.:5:LoadCompatibleBitmap___s___FAILED:_CreateCompatibleDC__p__FAILED:__s
call fcn.004265da
add esp, 0x10
cmp dword [esi + 4], ebx
je 0x501d30
mov eax, dword [ebp - 4]
add eax, 0x64
push eax
call fcn.00513703
cmp eax, ebx
pop ecx
mov dword [ebp - 8], eax
jne 0x501ca5
push dword [ebp - 4]
push dword [ebp + 0xc]
push str.:5:LoadCompatibleBitmap___s___FAILED:_malloc__d__FAILED_to_allocate_memory_for_bitmap_bits.
call fcn.004265da
add esp, 0xc
jmp 0x501d30
push ebx
push edi
push eax
push dword [edi + 8]
push ebx
push dword [ebp - 0xc]
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_GetDIBits]
test eax, eax
jne 0x501ced
movsx eax, word [esi + 0xe]
push str._GetLastError_
push eax
movsx eax, word [esi + 0xc]
push eax
movzx eax, word [edi + 0xc]
push eax
movzx eax, word [edi + 0xe]
push eax
push dword [edi + 8]
push dword [edi + 4]
push dword [ebp + 0xc]
push str.:8:LoadCompatibleBitmap___s___FAILED:_GetDIBits__d__d__d_:_d:_dx_d_FAILED_to_return_the_bitmap_bits:__s
call fcn.004265da
add esp, 0x24
jmp 0x501d27
mov eax, dword [edi + 8]
mov ecx, dword [edi + 4]
push 0xcc0020
push ebx
push edi
push dword [ebp - 8]
push eax
push ecx
push ebx
push ebx
push eax
push ecx
push ebx
push ebx
push dword [esi]
call dword [sym.imp.GDI32.dll_StretchDIBits]
cmp eax, 0xffffffff
jne 0x501d27
push str._GetLastError_
push dword [ebp + 0xc]
push str.:8:LoadCompatibleBitmap___s___FAILED:_StretchDIBits___FAILED:__s
call fcn.004265da
add esp, 0xc
push dword [ebp - 8]
call fcn.00511758
pop ecx
push dword [ebp - 0xc]
call dword [sym.imp.GDI32.dll_DeleteObject]
push edi
call fcn.00511758
pop ecx
push dword [ebp - 0x10]
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_SetMapMode]
cmp esi, ebx
je 0x501d93
cmp dword [esi + 4], ebx
je 0x501d59
cmp dword [esi], ebx
jne 0x501d62
push esi
call fcn.00511758
pop ecx
xor esi, esi
cmp esi, ebx
je 0x501d93
mov eax, dword [0x6e2574]
cmp eax, ebx
jne 0x501d79
call fcn.004a8f27
mov dword [0x6e2574], eax
push dword [esi]
call fcn.004a9020
mov ebx, dword [esi]
mov eax, dword [0x6e2574]
pop ecx
push esi
call fcn.004a9427
mov eax, dword [esi]
pop ecx
jmp 0x501d95
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret