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

Disassembly:
sub esp, 0x5c
mov eax, dword [0x598b80]
xor eax, esp
mov dword [esp + 0x58], eax
mov ecx, dword [esp + 0x60]
xor edx, edx
mov eax, dword [esp + 0x6c]
test ecx, ecx
push ebx
mov ebx, dword [esp + 0x6c]
cmovns edx, ecx
push ebp
mov ebp, dword [esp + 0x78]
push edi
lea edi, [ebx + ecx]
mov dword [esp + 0x20], edx
mov ecx, dword [esp + 0x70]
cmovns edi, ebx
xor edx, edx
mov dword [esp + 0x28], ebx
test ecx, ecx
mov dword [esp + 0x14], edi
lea ebx, [eax + ecx]
cmovns edx, ecx
cmovns ebx, eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x2c], ebx
cmp ebx, 1
jl 0x4d7391
cmp edi, 1
jl 0x4d7391
mov eax, ebx
imul eax, edi
push esi
lea esi, [eax + eax*2]
push esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
push esi
push 0
push eax
mov dword [esp + 0x2c], eax
call fcn.00518d30
lea eax, [edi + 1]
mov ecx, ebx
lea eax, [eax + eax*2]
cdq
and edx, 3
add eax, edx
and eax, 0xfffffffc
imul ecx, eax
mov dword [esp + 0x38], eax
push ecx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov ecx, ebx
mov dword [esp + 0x28], eax
neg ecx
mov dword [esp + 0x50], 0x28
add esp, 0x14
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], 0x180001
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0
test ebp, ebp
je 0x4d7236
call fcn.0049a4a0
cmp eax, ebp
je 0x4d7236
mov ecx, ebp
call fcn.0049a890
mov ecx, dword [0x599954]
mov eax, dword [ecx]
call dword [eax + 0x170]
mov esi, eax
push esi
call dword [sym.imp.gdi32.dll_CreateCompatibleDC]
push ebx
push edi
mov ebp, eax
push esi
mov dword [esp + 0x44], ebp
call dword [sym.imp.gdi32.dll_CreateCompatibleBitmap]
push ebp
mov dword [esp + 0x14], eax
call dword [sym.imp.gdi32.dll_SaveDC]
push dword [esp + 0x10]
mov dword [esp + 0x38], eax
push ebp
call dword [sym.imp.gdi32.dll_SelectObject]
push 0xcc0020
push dword [esp + 0x24]
push dword [esp + 0x2c]
push esi
push ebx
push edi
push 0
push 0
push ebp
call dword [sym.imp.gdi32.dll_BitBlt]
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x3c]
push 0
push eax
push esi
push ebx
push 0
push dword [esp + 0x24]
push ebp
call dword [sym.imp.gdi32.dll_GetDIBits]
xor ebp, ebp
nop dword [eax]
mov ecx, dword [esp + 0x74]
mov eax, ebp
imul eax, dword [esp + 0x28]
mov edx, ebp
mov ebx, dword [esp + 0x70]
sub edx, ecx
add eax, esi
test ecx, ecx
cmovns edx, ebp
imul edx, dword [esp + 0x2c]
mov ecx, edx
sub ecx, ebx
test ebx, ebx
cmovns ecx, edx
mov edx, dword [esp + 0x1c]
lea esi, [edx + ecx*2]
add esi, ecx
mov cl, byte [eax + 2]
lea eax, [eax + 3]
mov bl, byte [eax - 3]
lea esi, [esi + 3]
mov dl, byte [eax - 2]
mov byte [esi - 3], cl
mov byte [esi - 2], dl
mov byte [esi - 1], bl
sub edi, 1
jne 0x4d72e1
mov ebx, dword [esp + 0x30]
inc ebp
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
cmp ebp, ebx
jl 0x4d72b0
push dword [esp + 0x34]
mov esi, dword [esp + 0x3c]
push esi
call dword [sym.imp.gdi32.dll_RestoreDC]
push esi
call dword [sym.imp.gdi32.dll_DeleteDC]
push dword [esp + 0x10]
call dword [sym.imp.gdi32.dll_DeleteObject]
mov eax, dword [esp + 0x14]
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
push 0x3c
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 8
pop esi
test eax, eax
je 0x4d7374
push 0
push 3
push ebx
push edi
push dword [esp + 0x28]
mov ecx, eax
call fcn.004acbc0
pop edi
pop ebp
pop ebx
mov dword [eax + 0x28], 1
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.00515f8b
add esp, 0x5c
ret 0x14
xor eax, eax
pop edi
pop ebp
pop ebx
mov dword [eax + 0x28], 1
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.00515f8b
add esp, 0x5c
ret 0x14
mov ecx, dword [esp + 0x64]
xor eax, eax
pop edi
pop ebp
pop ebx
xor ecx, esp
call fcn.00515f8b
add esp, 0x5c
ret 0x14