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

Disassembly:
sub esp, 0x480
push ebx
push edi
mov edi, eax
mov eax, dword [edi + 0xc]
test eax, eax
je 0x507348
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov ebx, eax
push 0x42c
lea eax, [esp + 0x60]
push 0
push eax
mov dword [esp + 0x20], ebx
call fcn.006a1300
mov edx, dword [edi + 4]
add esp, 0xc
push 0
lea ecx, [esp + 0x60]
push ecx
push 0
push 0
push 0
push edx
push ebx
mov dword [esp + 0x78], 0x28
call dword [sym.imp.GDI32.dll_GetDIBits]
test eax, eax
je 0x5073a3
cmp eax, 0x57
je 0x5073a3
mov al, byte [esp + 0x6a]
cmp al, 0x20
mov byte [esp + 0xb], al
je 0x5073b5
cmp al, 0x18
je 0x5073b5
push ebx
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
pop edi
pop ebx
add esp, 0x480
ret
push esi
mov esi, dword [esp + 0x74]
cmp esi, 4
jae 0x5073d2
push ebx
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
pop esi
pop edi
pop ebx
add esp, 0x480
ret
mov ebx, dword [esp + 0x64]
push ebp
mov ebp, dword [esp + 0x6c]
push 0x2c
lea eax, [esp + 0x3c]
push 0
push eax
mov dword [esp + 0x24], ebx
call fcn.006a1300
add esp, 0xc
xor eax, eax
push eax
push eax
lea edx, [esp + 0x1c]
push edx
push eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x24], eax
lea eax, [esp + 0x48]
mov dword [esp + 0x4c], ebx
mov ebx, dword [esp + 0x2c]
push eax
mov ecx, ebp
push ebx
mov dword [esp + 0x50], 0x2c
mov dword [esp + 0x58], ecx
mov word [esp + 0x5c], 1
mov word [esp + 0x5e], 0x20
call dword [sym.imp.GDI32.dll_CreateDIBSection]
test eax, eax
mov dword [edi + 0xc], eax
je 0x507629
cmp dword [esp + 0x14], 0
je 0x507629
cmp byte [esp + 0x13], 0x20
jne 0x5074ff
push esi
call fcn.0069c0de
push esi
mov ebx, eax
push 0
push ebx
call fcn.006a1300
mov edx, dword [edi + 4]
mov eax, dword [esp + 0x2c]
add esp, 0x10
push 0
lea ecx, [esp + 0x68]
push ecx
push ebx
push ebp
push 0
push edx
push eax
call dword [sym.imp.GDI32.dll_GetDIBits]
shr esi, 2
je 0x507608
mov ebp, 0xfffffffe
lea edi, [ebx + 2]
sub ebp, ebx
mov dword [esp + 0x18], esi
jmp 0x5074a0
movzx edx, byte [edi]
movzx ecx, byte [edi + 1]
movzx eax, byte [edi - 2]
push edx
mov dl, byte [edi - 1]
mov byte [esp + 0x17], cl
lea esi, [edi + ebp]
add esi, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x1b]
call fcn.00507640
movzx ecx, byte [esp + 0x13]
add edi, 4
sub dword [esp + 0x18], 1
mov byte [esi + 2], al
mov byte [esi + 1], al
mov byte [esi], al
mov byte [esi + 3], cl
jne 0x5074a0
push ebx
call fcn.0069c8fa
mov ecx, dword [esp + 0x20]
add esp, 4
push ecx
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
pop ebp
pop esi
pop edi
pop ebx
add esp, 0x480
ret
xor ecx, ecx
mov eax, esi
mov edx, 3
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0069c0de
mov ebx, eax
lea eax, [esi + esi*2]
push eax
push 0
push ebx
mov dword [esp + 0x3c], ebx
call fcn.006a1300
mov edx, dword [edi + 4]
mov eax, dword [esp + 0x2c]
add esp, 0x10
push 0
lea ecx, [esp + 0x68]
push ecx
push ebx
push ebp
push 0
push edx
push eax
call dword [sym.imp.GDI32.dll_GetDIBits]
test ebp, ebp
mov edi, ebx
jbe 0x507608
mov eax, dword [esp + 0x18]
mov ecx, eax
and ecx, 3
xor esi, esi
mov dword [esp + 0x28], ecx
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], ebp
mov bl, 0xff
lea esp, [esp]
test eax, eax
jbe 0x5075e6
mov ebp, eax
movzx ecx, byte [edi]
mov dl, byte [edi + 1]
add edi, 1
movzx eax, byte [edi + 1]
add edi, 1
mov byte [esp + 0x30], cl
mov byte [esp + 0x34], al
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
push ecx
push eax
lea ecx, [esp + 0x1b]
add edi, 1
mov byte [esp + 0x1b], bl
call fcn.00507640
mov ecx, dword [esp + 0x14]
mov byte [esi + ecx + 2], al
mov eax, dword [esp + 0x14]
movzx edx, byte [esi + eax + 2]
mov byte [esi + eax + 1], dl
mov eax, dword [esp + 0x14]
movzx ecx, byte [esi + eax + 1]
mov byte [esi + eax], cl
movzx eax, byte [esp + 0x13]
mov edx, dword [esp + 0x14]
mov byte [esi + edx + 3], al
add esi, 4
sub ebp, 1
jne 0x507576
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x24]
lea edx, [eax*4]
add esi, edx
add edi, ecx
sub dword [esp + 0x20], 1
mov dword [esp + 0x24], esi
jne 0x507570
mov ebx, dword [esp + 0x2c]
push ebx
call fcn.0069c8fa
mov ecx, dword [esp + 0x20]
add esp, 4
push ecx
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
pop ebp
pop esi
pop edi
pop ebx
add esp, 0x480
ret
push ebx
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
pop ebp
pop esi
pop edi
pop ebx
add esp, 0x480
ret