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

Disassembly:
sub esp, 0x58
push esi
mov esi, ecx
mov ecx, dword [esp + 0x60]
test ecx, ecx
je 0x4de290
mov eax, dword [esi]
test eax, eax
je 0x4de290
cmp dword [esi + 0x14], 1
jne 0x4ddfe7
mov edx, dword [esp + 0x7c]
push edx
mov edx, dword [esp + 0x7c]
push edx
mov edx, dword [esp + 0x7c]
push edx
mov edx, dword [esp + 0x78]
push eax
mov eax, dword [esp + 0x80]
push eax
mov eax, dword [esp + 0x7c]
push edx
mov edx, dword [esp + 0x7c]
push eax
push edx
push ecx
call dword [sym.imp.GDI32.dll_BitBlt]
pop esi
add esp, 0x58
ret 0x20
mov eax, dword [esi + 0xc]
push ebx
push ebp
push edi
lea edi, [eax*4]
mov dword [esp + 0x10], edi
imul edi, eax
push edi
call fcn.0051f044
mov ebx, dword [sym.imp.GDI32.dll_GetBitmapBits]
add esp, 4
mov dword [esp + 0x48], eax
push eax
mov eax, dword [esi + 4]
push edi
push eax
call ebx
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x14]
cdq
idiv ecx
mov edi, eax
mov eax, dword [esi + 0x10]
cdq
idiv ecx
lea ebp, [edi*4]
mov ecx, dword [esi]
mov dword [esp + 0x60], ebp
imul ebp, edi
push ecx
mov dword [esp + 0x44], edi
mov dword [esp + 0x60], ebp
mov dword [esp + 0x2c], eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x64], eax
mov eax, dword [esi]
push edx
push edi
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push ebp
mov dword [esp + 0x48], eax
call fcn.0051f044
mov ecx, dword [esp + 0x48]
add esp, 4
mov edi, eax
push edi
push ebp
push ecx
mov dword [esp + 0x5c], edi
call ebx
mov ebx, dword [esi + 0x14]
mov edx, dword [esp + 0x28]
mov esi, ebx
mov dword [esp + 0x34], ebx
imul esi, ebx
lea eax, [edx - 2]
mov dword [esp + 0x54], esi
cmp eax, 1
mov dword [esp + 0x24], 0
jle 0x4de204
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x24]
add ecx, 0xfffffffe
mov dword [esp + 0x2c], ecx
mov ecx, ebx
imul ecx, dword [esp + 0x10]
dec eax
mov dword [esp + 0x58], ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x40], eax
cmp dword [esp + 0x2c], 1
jle 0x4de1e1
mov eax, dword [esp + 0x10]
mov ecx, edx
mov edx, dword [esp + 0x28]
mov dword [esp + 0x38], ecx
neg eax
lea edx, [edx + ebx*4]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x2c]
dec edx
mov dword [esp + 0x3c], edx
jmp 0x4de0f9
mov eax, dword [esp + 0x4c]
xor ebp, ebp
mov dword [esp + 0x14], eax
test ebx, ebx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], ebp
jle 0x4de18f
mov dword [esp + 0x30], ebx
jmp 0x4de119
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x20]
lea edx, [ecx + eax]
mov eax, dword [esp + 0x14]
lea esi, [edx + 1]
lea ecx, [esi + eax - 4]
mov eax, edx
sub eax, esi
sub edx, esi
mov esi, ebx
lea edi, [eax + 2]
mov ebx, dword [esp + 0x18]
xor eax, eax
mov al, byte [edi + ecx]
add ecx, 4
add ebp, eax
xor eax, eax
mov al, byte [ecx - 4]
add ebx, eax
xor eax, eax
mov al, byte [edx + ecx - 4]
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0x1c]
add ebx, eax
dec esi
mov dword [esp + 0x1c], ebx
jne 0x4de13a
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x30]
add edx, ecx
dec eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x30], eax
jne 0x4de115
mov edi, dword [esp + 0x50]
mov ebx, dword [esp + 0x34]
mov esi, dword [esp + 0x54]
mov ecx, dword [esp + 0x38]
mov eax, ebp
add ecx, 4
cdq
idiv esi
mov dword [esp + 0x38], ecx
mov byte [ecx + edi - 2], al
mov eax, dword [esp + 0x18]
cdq
idiv esi
mov byte [ecx + edi - 3], al
mov eax, dword [esp + 0x1c]
cdq
idiv esi
mov edx, dword [esp + 0x20]
mov byte [ecx + edi - 4], al
lea eax, [ebx*4]
add edx, eax
mov eax, dword [esp + 0x3c]
dec eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x3c], eax
jne 0x4de0f5
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x24]
mov ebp, dword [esp + 0x5c]
mov eax, dword [esp + 0x60]
add edx, eax
mov eax, dword [esp + 0x28]
add eax, ecx
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x40]
dec eax
mov dword [esp + 0x40], eax
jne 0x4de0c4
mov ebx, dword [esp + 0x44]
push edi
push ebp
push ebx
call dword [sym.imp.GDI32.dll_SetBitmapBits]
mov edx, dword [esp + 0x48]
push edx
call fcn.0051f06d
push edi
call fcn.0051f06d
mov esi, dword [esp + 0x6c]
mov edi, dword [sym.imp.GDI32.dll_SelectObject]
add esp, 8
push ebx
push esi
call edi
mov ecx, dword [esp + 0x84]
mov edx, dword [esp + 0x80]
mov ebp, eax
mov eax, dword [esp + 0x88]
push eax
mov eax, dword [esp + 0x80]
push ecx
mov ecx, dword [esp + 0x80]
push edx
mov edx, dword [esp + 0x80]
push esi
push eax
mov eax, dword [esp + 0x84]
push ecx
mov ecx, dword [esp + 0x84]
push edx
push eax
push ecx
call dword [sym.imp.GDI32.dll_BitBlt]
push ebp
push esi
call edi
push ebx
call dword [sym.imp.GDI32.dll_DeleteObject]
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x58
ret 0x20