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

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
mov esi, dword [esp + 0x2c]
push edi
xor edi, edi
mov ecx, dword [esi + 0x2c4]
mov eax, dword [esi + 0x188]
test ecx, ecx
je 0x4b87bc
test eax, eax
je 0x4b8790
push 0x186a0
push eax
push ecx
lea eax, [esp + 0x3c]
push eax
call fcn.004af2e0
add esp, 0x10
test eax, eax
je 0x4b8789
push dword [esp + 0x30]
call fcn.004ae7d0
add esp, 4
test eax, eax
je 0x4b879f
mov edi, 1
jmp 0x4b879f
push ecx
call fcn.004af4b0
add esp, 4
mov dword [esi + 0x188], eax
or word [esi + 0x30e], 1
lea ebx, [esi + 0x7c]
mov ecx, dword [ebx]
mov dword [esp + 0x18], ebx
test edi, edi
je 0x4b87fe
or ecx, 0x2000
jmp 0x4b8804
lea ebx, [esi + 0x7c]
mov dword [esp + 0x18], ebx
test eax, eax
je 0x4b87da
push eax
call fcn.004af4b0
mov ecx, dword [ebx]
add esp, 4
mov dword [esi + 0x2c4], eax
jmp 0x4b87f6
mov eax, ebx
mov dword [esi + 0x2c4], 0x186a0
mov dword [esi + 0x188], 0x186a0
mov dword [esp + 0x18], ebx
mov ecx, dword [eax]
or word [esi + 0x30e], 1
and ecx, 0xffffdfff
mov eax, ecx
mov dword [ebx], ecx
and eax, 0x40080
cmp eax, 0x40000
jne 0x4b882c
and dword [esi + 0x78], 0xffffdfff
and ecx, 0xfd7ffeff
xor eax, eax
mov dword [ebx], ecx
mov word [esi + 0x148], ax
push dword [esi + 0x188]
call fcn.004ae7d0
add esp, 4
test eax, eax
jne 0x4b884b
and dword [ebx], 0xff7fffff
and dword [esi + 0x78], 0xffffdfff
test dword [ebx], 0x600000
je 0x4b885c
push esi
call fcn.004ad560
add esp, 4
mov ecx, dword [ebx]
test ecx, 0x100
je 0x4b8871
test byte [esi + 0x14f], 2
jne 0x4b88a6
jmp 0x4b889f
mov eax, ecx
and eax, 0x4080
cmp eax, 0x4080
jne 0x4b88a6
movzx eax, word [esi + 0x166]
cmp ax, word [esi + 0x168]
jne 0x4b88a6
cmp ax, word [esi + 0x16a]
jne 0x4b88a6
mov word [esi + 0x16c], ax
or dword [esi + 0x74], 0x800
mov dl, byte [esi + 0x14f]
cmp dl, 3
jne 0x4b88bf
push esi
call fcn.004b8610
add esp, 4
jmp 0x4b8980
test dl, 4
jne 0x4b88e5
and dword [esi + 0x78], 0xffffdfff
and ecx, 0xff7fffff
cmp word [esi + 0x148], 0
mov dword [ebx], ecx
ja 0x4b88e5
and ecx, 0xfffffe7f
mov dword [ebx], ecx
mov eax, ecx
and eax, 0x1100
cmp eax, 0x1100
jne 0x4b8980
test dl, 2
jne 0x4b8980
movzx eax, byte [esi + 0x150]
movzx edi, word [esi + 0x16c]
movzx edx, word [esi + 0x1bc]
sub eax, 1
je 0x4b893c
sub eax, 1
je 0x4b8934
sub eax, 2
jne 0x4b8948
mov eax, edi
shl edi, 4
add edi, eax
mov eax, edx
shl edx, 4
add edx, eax
jmp 0x4b8948
imul edi, edi, 0x55
imul edx, edx, 0x55
jmp 0x4b8948
imul edi, edi, 0xff
imul edx, edx, 0xff
movzx eax, di
mov word [esi + 0x16a], ax
mov word [esi + 0x168], ax
mov word [esi + 0x166], ax
test ecx, 0x2000000
jne 0x4b8980
movzx eax, dx
mov word [esi + 0x1ba], ax
mov word [esi + 0x1b8], ax
mov word [esi + 0x1b6], ax
mov edx, dword [ebx]
mov eax, edx
and eax, 0x380
cmp eax, 0x280
jne 0x4b8a09
cmp byte [esi + 0x150], 0x10
je 0x4b8a09
movzx eax, word [esi + 0x166]
add eax, 0x81
imul eax, eax, 0xff
shr eax, 0x10
mov word [esi + 0x166], ax
movzx eax, word [esi + 0x168]
add eax, 0x81
imul eax, eax, 0xff
shr eax, 0x10
mov word [esi + 0x168], ax
movzx eax, word [esi + 0x16a]
add eax, 0x81
imul eax, eax, 0xff
shr eax, 0x10
mov word [esi + 0x16a], ax
movzx eax, word [esi + 0x16c]
add eax, 0x81
imul eax, eax, 0xff
shr eax, 0x10
mov word [esi + 0x16c], ax
test edx, 0x4000400
setne cl
test dl, 0x80
setne al
test al, cl
je 0x4b8a78
test edx, 0x100
jne 0x4b8a78
cmp byte [esi + 0x150], 0x10
jne 0x4b8a78
movzx ecx, word [esi + 0x166]
mov edi, 0x101
mov eax, edi
imul ecx, eax
mov word [esi + 0x166], cx
movzx ecx, word [esi + 0x168]
imul ecx, eax
mov word [esi + 0x168], cx
movzx ecx, word [esi + 0x16a]
imul ecx, eax
mov word [esi + 0x16a], cx
movzx ecx, word [esi + 0x16c]
imul ecx, eax
mov word [esi + 0x16c], cx
movq xmm0, qword [esi + 0x164]
mov ax, word [esi + 0x16c]
movq qword [esi + 0x16e], xmm0
mov word [esi + 0x176], ax
test edx, 0x2000
jne 0x4b8cb2
test edx, 0x600000
je 0x4b8ad6
push dword [esi + 0x2c4]
call fcn.004ae7d0
add esp, 4
test eax, eax
jne 0x4b8cb2
push dword [esi + 0x188]
call fcn.004ae7d0
add esp, 4
test eax, eax
jne 0x4b8cb2
test byte [ebx], 0x80
je 0x4b8b26
push dword [esi + 0x2c4]
call fcn.004ae7d0
add esp, 4
test eax, eax
jne 0x4b8cb2
push dword [esi + 0x188]
call fcn.004ae7d0
add esp, 4
test eax, eax
jne 0x4b8cb2
cmp byte [esi + 0x15c], 3
jne 0x4b8b26
push dword [esi + 0x160]
call fcn.004ae7d0
add esp, 4
test eax, eax
jne 0x4b8cb2
test dword [ebx], 0x800000
je 0x4b8b44
push dword [esi + 0x188]
call fcn.004ae7d0
add esp, 4
test eax, eax
jne 0x4b8cb2
mov eax, dword [ebx]
mov edx, eax
test al, al
jns 0x4b9254
cmp byte [esi + 0x14f], 3
jne 0x4b9254
mov al, byte [esi + 0x166]
movzx ecx, word [esi + 0x148]
mov dl, byte [esi + 0x16a]
mov ebp, dword [esi + 0x13c]
mov byte [esp + 0x13], al
mov byte [esp + 0x14], al
mov al, byte [esi + 0x168]
mov byte [esp + 0x12], al
mov byte [esp + 0x15], al
xor eax, eax
mov byte [esp + 0x30], dl
mov dword [esp + 0x20], eax
test ecx, ecx
je 0x4b8ca5
mov ecx, dword [esi + 0x1b0]
add ebp, 2
movzx ebx, word [esi + 0x148]
nop
add ecx, eax
mov dword [esp + 0x1c], ecx
mov cl, byte [ecx]
test cl, cl
jne 0x4b8bcd
mov cx, word [esp + 0x14]
mov word [ebp - 2], cx
mov byte [ebp], dl
jmp 0x4b8c8b
cmp cl, 0xff
je 0x4b8c8b
movzx eax, byte [esp + 0x13]
movzx edx, cl
mov ecx, 0xff
sub ecx, edx
movzx edi, cx
imul edi, eax
movzx eax, byte [ebp - 2]
imul eax, edx
add di, ax
mov eax, pe_nt_image_headers32
add di, ax
movzx eax, di
mov ecx, eax
shr ecx, 8
add ecx, eax
mov eax, dword [esp + 0x1c]
shr ecx, 8
mov byte [ebp - 2], cl
mov ecx, 0xff
movzx edx, byte [eax]
movzx eax, byte [esp + 0x12]
sub ecx, edx
movzx edi, cx
imul edi, eax
movzx eax, byte [ebp - 1]
imul eax, edx
add di, ax
mov eax, pe_nt_image_headers32
add di, ax
movzx eax, di
mov ecx, eax
shr ecx, 8
add ecx, eax
mov eax, dword [esp + 0x1c]
shr ecx, 8
mov byte [ebp - 1], cl
mov ecx, 0xff
movzx edx, byte [eax]
movzx eax, byte [esp + 0x30]
sub ecx, edx
movzx edi, cx
imul edi, eax
movzx eax, byte [ebp]
imul eax, edx
mov dl, byte [esp + 0x30]
add di, ax
mov eax, pe_nt_image_headers32
add di, ax
movzx eax, di
mov ecx, eax
shr ecx, 8
add ecx, eax
mov eax, dword [esp + 0x20]
shr ecx, 8
mov byte [ebp], cl
mov ecx, dword [esi + 0x1b0]
inc eax
add ebp, 3
mov dword [esp + 0x20], eax
cmp eax, ebx
jl 0x4b8bb0
mov ebx, dword [esp + 0x18]
mov edx, dword [ebx]
and edx, 0xffffff7f
jmp 0x4b9252
movzx eax, byte [esi + 0x150]
push eax
push esi
call fcn.004ac1f0
mov eax, dword [ebx]
add esp, 8
test al, al
jns 0x4b91ec
test eax, 0x600000
je 0x4b8ce2
push str.libpng_does_not_support_gammabackgroundrgb_to_gray
push esi
call fcn.004b4200
add esp, 8
cmp byte [esi + 0x14f], 3
mov al, byte [esi + 0x15c]
jne 0x4b9029
movzx ecx, word [esi + 0x140]
mov ebp, dword [esi + 0x13c]
mov dword [esp + 0x20], ebp
mov dword [esp + 0x28], ecx
cmp al, 2
jne 0x4b8d5e
mov edx, dword [esi + 0x18c]
movzx ebx, word [esi + 0x166]
movzx edi, word [esi + 0x168]
movzx ecx, word [esi + 0x16a]
mov al, byte [ebx + edx]
mov byte [esp + 0x14], al
mov al, byte [edi + edx]
mov byte [esp + 0x15], al
mov al, byte [ecx + edx]
mov byte [esp + 0x30], al
mov eax, dword [esi + 0x198]
mov dl, byte [ebx + eax]
mov ebx, dword [esp + 0x18]
mov byte [esp + 0x11], dl
mov dl, byte [edi + eax]
mov al, byte [ecx + eax]
mov byte [esp + 0x12], dl
jmp 0x4b8e92
movzx eax, al
sub eax, 1
je 0x4b8dc3
sub eax, 1
je 0x4b8d9e
sub eax, 1
je 0x4b8d79
mov ebp, 0x186a0
mov edi, ebp
jmp 0x4b8dce
push dword [esi + 0x160]
call fcn.004af4b0
push dword [esi + 0x188]
mov ebp, eax
push dword [esi + 0x160]
call fcn.004af520
add esp, 0xc
mov edi, eax
jmp 0x4b8dce
push dword [esi + 0x2c4]
call fcn.004af4b0
push dword [esi + 0x188]
mov ebp, eax
push dword [esi + 0x2c4]
call fcn.004af520
add esp, 0xc
mov edi, eax
jmp 0x4b8dce
mov ebp, dword [esi + 0x188]
mov edi, 0x186a0
push edi
call fcn.004ae7d0
add esp, 4
test eax, eax
je 0x4b8e12
movzx eax, word [esi + 0x166]
push edi
push eax
call fcn.004ae660
mov byte [esp + 0x1c], al
movzx eax, word [esi + 0x168]
push edi
push eax
call fcn.004ae660
mov byte [esp + 0x25], al
movzx eax, word [esi + 0x16a]
push edi
push eax
call fcn.004ae660
add esp, 0x18
jmp 0x4b8e2c
mov al, byte [esi + 0x166]
mov byte [esp + 0x14], al
mov al, byte [esi + 0x168]
mov byte [esp + 0x15], al
mov al, byte [esi + 0x16a]
push ebp
mov byte [esp + 0x34], al
call fcn.004ae7d0
add esp, 4
test eax, eax
je 0x4b8e74
movzx eax, word [esi + 0x166]
push ebp
push eax
call fcn.004ae660
movzx ecx, word [esi + 0x168]
push ebp
push ecx
mov byte [esp + 0x21], al
call fcn.004ae660
movzx ecx, word [esi + 0x16a]
push ebp
push ecx
mov byte [esp + 0x2a], al
call fcn.004ae660
add esp, 0x18
jmp 0x4b8e8e
mov al, byte [esi + 0x166]
mov byte [esp + 0x11], al
mov al, byte [esi + 0x168]
mov byte [esp + 0x12], al
mov al, byte [esi + 0x16a]
mov ebp, dword [esp + 0x20]
xor edx, edx
mov byte [esp + 0x13], al
mov dword [esp + 0x24], edx
cmp dword [esp + 0x28], edx
jbe 0x4b901c
movzx eax, word [esi + 0x148]
lea edi, [ebp + 2]
mov dword [esp + 0x1c], edi
mov ebp, pe_nt_image_headers32
nop dword [eax]
cmp edx, eax
jge 0x4b8fd9
mov eax, dword [esi + 0x1b0]
add eax, edx
mov dword [esp + 0x20], eax
mov al, byte [eax]
cmp al, 0xff
je 0x4b8fd9
test al, al
jne 0x4b8ef4
mov ax, word [esp + 0x14]
mov word [edi - 2], ax
mov al, byte [esp + 0x30]
jmp 0x4b8ff9
mov ebx, dword [esi + 0x198]
mov ecx, 0xff
movzx edx, al
movzx eax, byte [edi - 2]
sub ecx, edx
movzx ecx, cx
movzx edi, byte [eax + ebx]
movzx eax, byte [esp + 0x11]
imul ecx, eax
imul edi, edx
add di, cx
add di, bp
mov ebp, dword [esi + 0x194]
movzx eax, di
mov ecx, eax
shr ecx, 8
add ecx, eax
shr ecx, 8
movzx eax, cl
mov ecx, dword [esp + 0x1c]
mov al, byte [eax + ebp]
mov byte [ecx - 2], al
mov eax, dword [esp + 0x20]
movzx edx, byte [eax]
movzx eax, byte [ecx - 1]
mov ecx, 0xff
sub ecx, edx
movzx ecx, cx
movzx edi, byte [eax + ebx]
movzx eax, byte [esp + 0x12]
imul ecx, eax
mov eax, pe_nt_image_headers32
imul edi, edx
add di, cx
add di, ax
movzx eax, di
mov ecx, eax
shr ecx, 8
add ecx, eax
shr ecx, 8
movzx eax, cl
mov ecx, dword [esp + 0x1c]
mov al, byte [eax + ebp]
mov byte [ecx - 1], al
mov eax, dword [esp + 0x20]
movzx edx, byte [eax]
movzx eax, byte [ecx]
mov ecx, 0xff
sub ecx, edx
movzx ecx, cx
movzx edi, byte [eax + ebx]
movzx eax, byte [esp + 0x13]
imul ecx, eax
mov eax, pe_nt_image_headers32
imul edi, edx
mov edx, dword [esp + 0x24]
add di, cx
add di, ax
movzx eax, di
mov edi, dword [esp + 0x1c]
mov ecx, eax
shr ecx, 8
add ecx, eax
shr ecx, 8
movzx eax, cl
mov al, byte [eax + ebp]
mov ebp, pe_nt_image_headers32
jmp 0x4b8ff9
mov ecx, dword [esi + 0x18c]
movzx eax, byte [edi - 2]
mov al, byte [eax + ecx]
mov byte [edi - 2], al
movzx eax, byte [edi - 1]
mov al, byte [eax + ecx]
mov byte [edi - 1], al
movzx eax, byte [edi]
mov al, byte [eax + ecx]
mov byte [edi], al
inc edx
movzx eax, word [esi + 0x148]
add edi, 3
mov dword [esp + 0x24], edx
mov dword [esp + 0x1c], edi
cmp edx, dword [esp + 0x28]
jl 0x4b8ec0
mov ebx, dword [esp + 0x18]
and dword [ebx], 0xffffdf7f
mov edx, dword [ebx]
jmp 0x4b9254
movzx eax, al
mov edi, 0x186a0
sub eax, 1
je 0x4b908e
sub eax, 1
je 0x4b9069
sub eax, 1
jne 0x4b932b
push dword [esi + 0x160]
call fcn.004af4b0
push dword [esi + 0x188]
mov ebp, eax
push dword [esi + 0x160]
call fcn.004af520
add esp, 0xc
mov edi, eax
jmp 0x4b9094
push dword [esi + 0x2c4]
call fcn.004af4b0
push dword [esi + 0x188]
mov ebp, eax
push dword [esi + 0x2c4]
call fcn.004af520
add esp, 0xc
mov edi, eax
jmp 0x4b9094
mov ebp, dword [esi + 0x188]
push ebp
call fcn.004ae7d0
push edi
mov dword [esp + 0x38], eax
call fcn.004ae7d0
add esp, 8
mov dword [esp + 0x28], eax
cmp dword [esp + 0x30], 0
je 0x4b90cf
movzx ecx, word [esi + 0x16c]
push ebp
push ecx
push esi
call fcn.004ae6e0
mov word [esi + 0x176], ax
add esp, 0xc
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4b90ec
movzx eax, word [esi + 0x16c]
push edi
push eax
push esi
call fcn.004ae6e0
add esp, 0xc
mov word [esi + 0x16c], ax
movzx eax, word [esi + 0x166]
cmp ax, word [esi + 0x168]
jne 0x4b9150
cmp ax, word [esi + 0x16a]
jne 0x4b9150
movzx ecx, word [esi + 0x16c]
cmp ax, cx
jne 0x4b9150
movzx eax, word [esi + 0x176]
mov edx, dword [ebx]
mov word [esi + 0x174], ax
mov word [esi + 0x172], ax
mov word [esi + 0x170], ax
mov word [esi + 0x16a], cx
mov word [esi + 0x168], cx
mov word [esi + 0x166], cx
mov byte [esi + 0x15c], 1
jmp 0x4b9254
cmp dword [esp + 0x30], 0
je 0x4b9195
push ebp
push eax
push esi
call fcn.004ae6e0
mov word [esi + 0x170], ax
movzx eax, word [esi + 0x168]
push ebp
push eax
push esi
call fcn.004ae6e0
mov word [esi + 0x172], ax
movzx eax, word [esi + 0x16a]
push ebp
push eax
push esi
call fcn.004ae6e0
add esp, 0x24
mov word [esi + 0x174], ax
cmp dword [esp + 0x28], 0
je 0x4b91e1
movzx eax, word [esi + 0x166]
push edi
push eax
push esi
call fcn.004ae6e0
mov word [esi + 0x166], ax
movzx eax, word [esi + 0x168]
push edi
push eax
push esi
call fcn.004ae6e0
mov word [esi + 0x168], ax
movzx eax, word [esi + 0x16a]
push edi
push eax
push esi
call fcn.004ae6e0
add esp, 0x24
mov word [esi + 0x16a], ax
mov edx, dword [ebx]
mov byte [esi + 0x15c], 1
jmp 0x4b9254
cmp byte [esi + 0x14f], 3
mov edx, eax
jne 0x4b9254
test eax, 0x600000
setne cl
bt eax, 0xc
setb al
test al, cl
jne 0x4b9254
movzx edi, word [esi + 0x140]
mov ecx, dword [esi + 0x13c]
test edi, edi
je 0x4b924a
mov edx, dword [esi + 0x18c]
add ecx, 2
movzx eax, byte [ecx - 2]
lea ecx, [ecx + 3]
mov al, byte [eax + edx]
mov byte [ecx - 5], al
movzx eax, byte [ecx - 4]
mov al, byte [eax + edx]
mov byte [ecx - 4], al
movzx eax, byte [ecx - 3]
mov al, byte [eax + edx]
mov byte [ecx - 3], al
sub edi, 1
jne 0x4b9224
mov edx, dword [ebx]
and edx, 0xffffdfff
mov dword [ebx], edx
mov eax, edx
and eax, 0x1008
cmp eax, 8
jne 0x4b9323
cmp byte [esi + 0x14f], 3
jne 0x4b9323
movzx eax, byte [esi + 0x1a4]
mov ecx, 8
movzx edi, word [esi + 0x140]
mov ebp, ecx
sub ebp, eax
and edx, 0xfffffff7
mov dword [ebx], edx
mov ebx, ebp
mov dword [esp + 0x30], ebp
test ebx, ebx
jle 0x4b92b9
cmp ebx, ecx
jge 0x4b92b9
test edi, edi
je 0x4b92b9
mov eax, dword [esi + 0x13c]
mov edx, edi
mov cl, bl
lea eax, [eax + 3]
shr byte [eax - 3], cl
sub edx, 1
jne 0x4b92a7
mov ecx, 8
movzx eax, byte [esi + 0x1a5]
mov edx, ecx
sub edx, eax
test edx, edx
jle 0x4b92f2
cmp edx, 8
jge 0x4b92f2
test edi, edi
je 0x4b92f2
mov eax, dword [esi + 0x13c]
mov ebx, edi
inc eax
nop word [eax + eax]
mov cl, dl
lea eax, [eax + 3]
shr byte [eax - 3], cl
sub ebx, 1
jne 0x4b92e0
mov ecx, 8
movzx eax, byte [esi + 0x1a6]
sub ecx, eax
mov dword [esp + 0x30], ecx
test ecx, ecx
jle 0x4b9323
cmp ecx, 8
jge 0x4b9323
test edi, edi
je 0x4b9323
mov eax, dword [esi + 0x13c]
add eax, 2
shr byte [eax], cl
lea eax, [eax + 3]
mov ecx, dword [esp + 0x30]
sub edi, 1
jne 0x4b9315
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
push esi
call fcn.004b3b90
int3