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

Disassembly:
sub esp, 0x8c
push esi
mov esi, ecx
mov eax, dword [esi + 0x3cc]
push edi
mov edi, dword [esp + 0x98]
cmp eax, dword [edi + 8]
jne 0x59a5a9
pop edi
xor al, al
pop esi
add esp, 0x8c
ret 4
mov ecx, dword [edi + 8]
lea edx, [esp + 0x38]
mov dword [esi + 0x3cc], ecx
mov eax, dword [edi + 8]
push edx
push eax
call dword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
je 0x59a59c
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
push ebx
push ebp
xor ebp, ebp
push ebp
mov dword [esi + 0x3d8], ecx
mov dword [esi + 0x3dc], edx
mov byte [esp + 0x17], 0
call dword [sym.imp.USER32.dll_GetDC]
mov ebx, eax
cmp ebx, ebp
mov dword [esp + 0x14], ebx
je 0x59a85e
cmp dword [esp + 0x50], ebp
mov byte [esi + 0x3e0], 0
jne 0x59a743
mov ecx, dword [esp + 0x4c]
mov edi, dword [sym.imp.GDI32.dll_GetDIBits]
xor eax, eax
push ebp
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
lea eax, [esp + 0x58]
push eax
push ebp
push ebp
push ebp
push ecx
push ebx
mov byte [esi + 0x3e0], 1
mov dword [esp + 0x70], 0x28
call edi
test eax, eax
je 0x59a700
mov edx, dword [esp + 0x58]
cmp edx, dword [esi + 0x3d0]
jne 0x59a700
mov eax, dword [esi + 0x3d4]
mov ecx, dword [esp + 0x5c]
add eax, eax
cmp ecx, eax
jne 0x59a700
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov eax, ecx
imul eax, edx
push ebp
add eax, eax
add eax, eax
mov dword [esp + 0x20], edx
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x34], eax
mov eax, dword [esi + 0x3f0]
push eax
push ecx
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x5c]
push ebp
push ecx
push ebx
mov dword [esp + 0x34], 0x28
mov word [esp + 0x40], 1
mov word [esp + 0x42], 0x20
mov dword [esp + 0x44], ebp
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x50], ebp
mov dword [esp + 0x54], ebp
mov dword [esp + 0x58], ebp
call edi
mov ecx, dword [esi + 0x3d4]
imul ecx, dword [esi + 0x3d0]
cmp ecx, ebp
mov esi, dword [esi + 0x3f0]
lea edx, [esi + ecx*4]
jbe 0x59a851
mov eax, esi
sub edx, esi
mov esi, dword [edx + eax]
mov edi, dword [eax]
not esi
shl esi, 0x18
and edi, 0xffffff
add esi, edi
mov dword [eax], esi
add eax, 4
sub ecx, 1
jne 0x59a722
jmp 0x59a851
mov eax, dword [esi + 0x3d4]
mov ecx, dword [esi + 0x3d0]
mov dword [esp + 0x8c], ebp
mov dword [esp + 0x90], ebp
mov dword [esp + 0x7c], ebp
mov ebp, dword [sym.imp.GDI32.dll_GetStockObject]
lea edx, [eax + eax]
push 4
mov dword [esp + 0x98], ecx
mov dword [esp + 0x9c], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], ecx
mov dword [esp + 0x8c], edx
call ebp
mov ecx, dword [esi + 0x3e4]
mov ebx, dword [sym.imp.USER32.dll_FillRect]
push eax
lea eax, [esp + 0x90]
push eax
push ecx
call ebx
push 0
call ebp
push eax
mov eax, dword [esi + 0x3e4]
lea edx, [esp + 0x80]
push edx
push eax
call ebx
mov ecx, dword [edi + 8]
mov edx, dword [esi + 0x3e4]
mov ebx, dword [sym.imp.USER32.dll_DrawIcon]
push ecx
push 0
push 0
push edx
call ebx
mov eax, dword [edi + 8]
mov ecx, dword [esi + 0x3d4]
mov edx, dword [esi + 0x3e4]
push eax
push ecx
push 0
push edx
call ebx
call dword [sym.imp.GDI32.dll_GdiFlush]
mov eax, dword [esi + 0x3d4]
imul eax, dword [esi + 0x3d0]
test eax, eax
mov ecx, dword [esi + 0x3f0]
lea edx, [ecx + eax*4]
jbe 0x59a84b
sub edx, ecx
mov esi, eax
mov eax, dword [edx + ecx]
mov edi, dword [ecx]
and eax, 0xff
and edi, 0xff
sub eax, edi
add eax, 0xff
cmp eax, 0x100
jb 0x59a833
not eax
sar eax, 0x1f
mov edi, dword [edx + ecx]
and edi, 0xffffff
shl eax, 0x18
add edi, eax
mov dword [ecx], edi
add ecx, 4
sub esi, 1
jne 0x59a810
mov ebx, dword [esp + 0x14]
xor ebp, ebp
push ebx
push ebp
mov byte [esp + 0x1b], 1
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [esp + 0x50]
cmp eax, ebp
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
je 0x59a86f
push eax
call esi
mov eax, dword [esp + 0x4c]
cmp eax, ebp
pop ebp
pop ebx
je 0x59a87c
push eax
call esi
mov al, byte [esp + 0xb]
pop edi
pop esi
add esp, 0x8c
ret 4