Function at 0x520ad0
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 0x520d77
mov edi, dword [ebp + 0xc]
call fcn.00432263
test eax, eax
je 0x520d77
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.00530848
mov edi, eax
cmp edi, ebx
pop ecx
pop ecx
jne 0x520b32
push 0x42c
push dword [ebp + 0xc]
push str.:4:LoadCompatibleBitmap___s___FAILED:_calloc__d__1__FAILED.
call fcn.0042b70b
add esp, 0xc
jmp 0x520d24
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 0x520b65
push str._GetLastError_
push dword [ebp + 0xc]
push str.:4:LoadCompatibleBitmap___FAILED:_LoadImage___s___FAILED:__s
call fcn.0042b70b
add esp, 0xc
jmp 0x520d1d
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 0x520b90
push str._GetLastError_
push dword [ebp + 0xc]
push str.:8:LoadCompatibleBitmap___s___FAILED:_GetDIBits___FAILED_to_obtain_the_bitmap_properties:__s
jmp 0x520c7c
push 0x10
push 1
call fcn.00530848
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x520d14
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 0x520c3e
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 0x520c12
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.0042b70b
add esp, 0x18
push dword [esi]
call dword [sym.imp.GDI32.dll_DeleteDC]
mov dword [esi], ebx
jmp 0x520c54
push eax
push dword [esi]
call dword [sym.imp.GDI32.dll_SelectObject]
cmp eax, ebx
mov dword [esi + 8], eax
jne 0x520c54
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.0042bd38
add esp, 0x14
jmp 0x520c54
push str._GetLastError_
push ebx
push dword [ebp + 0xc]
push str.:5:LoadCompatibleBitmap___s___FAILED:_CreateCompatibleDC__p__FAILED:__s
call fcn.0042b70b
add esp, 0x10
cmp dword [esi + 4], ebx
je 0x520d14
mov eax, dword [ebp - 4]
add eax, 0x64
push eax
call fcn.00532823
cmp eax, ebx
pop ecx
mov dword [ebp - 8], eax
jne 0x520c89
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.0042b70b
add esp, 0xc
jmp 0x520d14
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 0x520cd1
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.0042b70b
add esp, 0x24
jmp 0x520d0b
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 0x520d0b
push str._GetLastError_
push dword [ebp + 0xc]
push str.:8:LoadCompatibleBitmap___s___FAILED:_StretchDIBits___FAILED:__s
call fcn.0042b70b
add esp, 0xc
push dword [ebp - 8]
call fcn.0053061e
pop ecx
push dword [ebp - 0xc]
call dword [sym.imp.GDI32.dll_DeleteObject]
push edi
call fcn.0053061e
pop ecx
push dword [ebp - 0x10]
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_SetMapMode]
cmp esi, ebx
je 0x520d77
cmp dword [esi + 4], ebx
je 0x520d3d
cmp dword [esi], ebx
jne 0x520d46
push esi
call fcn.0053061e
pop ecx
xor esi, esi
cmp esi, ebx
je 0x520d77
mov eax, dword [0x7104fc]
cmp eax, ebx
jne 0x520d5d
call fcn.004b2094
mov dword [0x7104fc], eax
push dword [esi]
call fcn.004b218d
mov ebx, dword [esi]
mov eax, dword [0x7104fc]
pop ecx
push esi
call fcn.004b2594
mov eax, dword [esi]
pop ecx
jmp 0x520d79
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret