Function at 0x4f7e70
Capabilities:
Resolve function by parsing pe exports
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xcc0
mov esi, esp
mov dword [esi + 0x14], edx
mov dword [esi + 0x50], ecx
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x6c], 0
mov dword [esi + 0x68], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x64], 0
mov dword [esi + 0x60], 0
mov dword [esi + 0x5c], 0
xorps xmm0, xmm0
movups xmmword [esi + 0x9c], xmm0
movaps xmmword [esi + 0x90], xmm0
movaps xmmword [esi + 0x80], xmm0
movaps xmmword [esi + 0x70], xmm0
mov edi, dword [eax + 4]
lea eax, [edi*4]
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov dword [esi + 0x28], eax
test eax, eax
je 0x4f8864
mov dword [esi], edi
test edi, edi
jle 0x4f7f1e
mov eax, dword [ebp + 0xc]
mov ebx, dword [eax]
add ebx, ebx
xor edi, edi
nop dword [eax]
push ebx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov ecx, dword [esi + 0x28]
mov dword [ecx + edi*4], eax
test eax, eax
je 0x4f8864
add edi, 1
cmp dword [esi], edi
jne 0x4f7f00
mov edi, dword [ebp + 0x10]
push 9
push dword [esi + 0x14]
call fcn.00521180
add esp, 8
lea eax, [esi + 0x9bc]
push 0x300
push 0
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
xorps xmm0, xmm0
movaps xmmword [esi + 0x1a0], xmm0
movaps xmmword [esi + 0x190], xmm0
movaps xmmword [esi + 0x180], xmm0
movaps xmmword [esi + 0x170], xmm0
movaps xmmword [esi + 0x160], xmm0
movaps xmmword [esi + 0x150], xmm0
movaps xmmword [esi + 0x140], xmm0
movaps xmmword [esi + 0x130], xmm0
movaps xmmword [esi + 0x120], xmm0
movaps xmmword [esi + 0x110], xmm0
movaps xmmword [esi + 0x100], xmm0
movaps xmmword [esi + 0xf0], xmm0
movaps xmmword [esi + 0xe0], xmm0
movaps xmmword [esi + 0xd0], xmm0
movaps xmmword [esi + 0xc0], xmm0
movaps xmmword [esi + 0xb0], xmm0
mov eax, dword [edi + 8]
mov dword [esi + 0x54], eax
mov edi, dword [ebp + 0xc]
mov eax, dword [edi]
mov dword [esi + 0x18], eax
mov edi, dword [edi + 4]
lea eax, [esi + 0x1bc]
push 0x400
push 0
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
lea eax, [esi + 0x5bc]
push 0x400
push 0
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
mov dword [esi + 0x24], edi
test edi, edi
jle 0x4f822a
mov byte [esi + 7], 1
mov al, 1
mov dword [esi + 0x2c], eax
mov bh, 1
mov dword [esi + 0x34], 0
xor edx, edx
mov dword [esi], 0
mov dword [esi + 0x40], 0
jmp 0x4f8056
mov al, bh
mov dword [esi + 0xc], eax
mov al, byte [esi + 7]
mov ecx, eax
mov eax, dword [esi + 0x40]
add eax, 1
mov ebx, ecx
mov byte [esi + 7], cl
mov ebx, dword [esi + 0xc]
mov bh, bl
mov dword [esi + 0x40], eax
cmp eax, dword [esi + 0x24]
je 0x4f8245
cmp dword [esi + 0x18], 0
jle 0x4f8030
mov byte [esi + 0x13], bh
mov ecx, dword [esi + 0x40]
mov eax, dword [esi + 0x28]
mov eax, dword [eax + ecx*4]
mov dword [esi + 0x44], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
mov eax, dword [eax + ecx*4]
mov dword [esi + 0x4c], 0
jmp 0x4f80a7
mov edi, dword [esi + 8]
mov eax, dword [esi + 0x58]
add eax, 4
mov ebx, dword [esi + 0x4c]
add ebx, 1
mov ecx, dword [esi + 0x1c]
mov edx, ecx
mov byte [esi + 7], cl
mov edx, dword [esi + 0xc]
mov byte [esi + 0x13], dl
mov dword [esi + 0x4c], ebx
cmp ebx, dword [esi + 0x18]
mov edx, edi
je 0x4f803a
movzx ecx, byte [eax + 3]
mov dword [esi + 0x3c], ecx
test ecx, ecx
mov dword [esi + 8], edx
mov dword [esi + 0x58], eax
je 0x4f80d0
mov ecx, eax
movzx eax, byte [eax]
mov dword [esi + 0x38], eax
movzx ebx, byte [ecx + 1]
movzx eax, byte [ecx + 2]
mov dword [esi + 0x48], eax
jmp 0x4f80e9
mov word [eax], 0
mov byte [eax + 2], 0
mov dword [esi + 0x38], 0
xor ebx, ebx
mov dword [esi + 0x48], 0
mov ecx, dword [esi + 0x34]
mov eax, dword [esi + 0x38]
mov edx, eax
sub edx, ebx
mov dword [esi + 0x30], ebx
mov edi, edx
neg edi
cmovs edi, edx
cmp edi, ecx
cmovle edi, ecx
mov ecx, ebx
mov ebx, dword [esi + 0x48]
sub ecx, ebx
mov edx, ecx
neg edx
cmovs edx, ecx
cmp edx, edi
cmovbe edx, edi
mov ecx, ebx
sub ecx, eax
mov edi, ecx
neg edi
cmovs edi, ecx
cmp edi, edx
cmovbe edi, edx
mov dword [esi + 0x34], edi
mov ecx, eax
xor ecx, dword [esi + 0x30]
mov edx, ebx
xor edx, eax
or edx, ecx
mov al, byte [esi + 7]
movzx ecx, al
mov edx, 0
cmove edx, ecx
test al, 1
cmove edx, ecx
mov dword [esi + 0x1c], edx
cmp byte [esi + 0x3c], 0xff
mov al, byte [esi + 0x13]
movzx ecx, al
mov edx, ecx
mov edi, 0
cmovne edx, edi
test al, 1
cmove edx, ecx
mov ecx, edx
test byte [esi + 0x2c], 1
mov dword [esi + 0xc], edx
je 0x4f8080
mov edx, dword [esi + 0x38]
shl edx, 0x18
mov eax, dword [esi + 0x30]
shl eax, 0x10
or eax, edx
shl ebx, 8
or ebx, eax
mov eax, dword [esi + 0x3c]
or ebx, eax
cmp al, 0xff
mov edx, dword [esi + 8]
je 0x4f81c6
xor eax, eax
test edx, edx
jle 0x4f81ba
nop word cs:[eax + eax]
cmp dword [esi + eax*4 + 0x5bc], ebx
je 0x4f81fe
add eax, 1
cmp edx, eax
jne 0x4f81a0
mov eax, edx
cmp edx, 0xff
jg 0x4f81c1
mov dword [esi + edx*4 + 0x5bc], ebx
add edx, 1
jmp 0x4f81fe
cmp dword [esi], 0
jle 0x4f81ee
xor eax, eax
nop dword [eax]
cmp dword [esi + eax*4 + 0x1bc], ebx
je 0x4f81fe
add eax, 1
cmp dword [esi], eax
jne 0x4f81d0
mov edi, dword [esi]
mov eax, edi
cmp edi, 0xff
jle 0x4f81f2
jmp 0x4f81f9
xor eax, eax
mov edi, dword [esi]
mov dword [esi + edi*4 + 0x1bc], ebx
add edi, 1
mov dword [esi], edi
mov ebx, dword [esi + 0x44]
mov byte [ebx], al
add ebx, 1
mov dword [esi + 0x44], ebx
mov eax, dword [esi]
mov edi, edx
add eax, edx
cmp eax, 0x101
mov eax, dword [esi + 0x2c]
movzx eax, al
mov ebx, 0
cmovge eax, ebx
mov dword [esi + 0x2c], eax
jmp 0x4f8083
mov al, 1
mov dword [esi + 0xc], eax
mov dword [esi], 0
xor edx, edx
mov dword [esi + 0x34], 0
mov al, 1
mov dword [esi + 0x2c], eax
mov cl, 1
mov ebx, dword [esi + 0xc]
and bl, 1
mov edi, dword [esi + 0x24]
imul edi, dword [esi + 0x18]
mov eax, ecx
mov ecx, dword [esi]
lea ecx, [ecx + ecx*2]
add ecx, edi
mov dword [esi + 8], edx
lea ecx, [ecx + edx*4]
mov dword [esi + 0x1c], eax
test al, 1
mov dword [esi + 0xc], ebx
jne 0x4f82a2
cmp bl, 1
mov edx, 3
adc edx, 0
test byte [esi + 0x2c], 1
je 0x4f8283
imul edx, edi
cmp ecx, edx
jl 0x4f82c5
mov eax, dword [esi + 0x34]
cmp eax, dword [esi + 0x54]
jle 0x4f84ce
xor eax, eax
test bl, bl
sete al
lea eax, [eax*4 + 2]
jmp 0x4f84e9
xor edx, edx
test bl, bl
jne 0x4f83f5
mov edx, 4
test byte [esi + 0x2c], 1
je 0x4f83f5
add edi, edi
cmp ecx, edi
jge 0x4f83f5
mov dword [esi + 0x20], 3
mov edx, dword [esi + 8]
lea eax, [esi + edx*4]
add eax, 0x5bc
mov ecx, dword [esi]
lea ecx, [ecx*4]
push ecx
lea ecx, [esi + 0x1bc]
push ecx
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
cmp dword [esi + 0x24], 0
jle 0x4f8399
mov eax, dword [esi + 0x18]
and eax, 0xfffffffe
mov dword [esi + 0x1c], 0
jmp 0x4f831e
mov ecx, dword [esi + 0x1c]
add ecx, 1
mov dword [esi + 0x1c], ecx
cmp ecx, dword [esi + 0x24]
je 0x4f8399
cmp dword [esi + 0x18], 0
jle 0x4f8310
mov edx, dword [ebp + 0xc]
mov edx, dword [edx + 8]
mov ecx, dword [esi + 0x1c]
mov ebx, dword [edx + ecx*4]
mov edx, dword [esi + 0x28]
mov edx, dword [edx + ecx*4]
xor edi, edi
cmp dword [esi + 0x18], 1
jne 0x4f8360
test byte [esi + 0x18], 1
je 0x4f8310
cmp dword [ebx + edi*4], 0xff000000
jb 0x4f8310
mov ecx, dword [esi + 8]
add byte [edx + edi], cl
jmp 0x4f8310
xor edi, edi
jmp 0x4f8377
add edi, 2
cmp eax, edi
je 0x4f833e
cmp dword [ebx + edi*4], 0xff000000
jb 0x4f8386
mov ecx, dword [esi + 8]
add byte [edx + edi], cl
cmp dword [ebx + edi*4 + 4], 0xff000000
jb 0x4f8370
mov ecx, dword [esi + 8]
add byte [edx + edi + 1], cl
jmp 0x4f8370
mov edx, dword [esi + 8]
mov eax, dword [esi]
add eax, edx
test eax, eax
mov dword [esi], eax
jle 0x4f84b7
lea eax, [esi + 0x9be]
xor ecx, ecx
jmp 0x4f83ce
add ecx, 1
add eax, 3
cmp dword [esi], ecx
je 0x4f84bc
mov edx, dword [esi + ecx*4 + 0x5bc]
mov ebx, edx
shr ebx, 0x18
mov byte [eax - 2], bl
mov ebx, edx
shr ebx, 0x10
mov byte [eax - 1], bl
mov byte [eax], dh
cmp ecx, dword [esi + 8]
jge 0x4f83c0
mov byte [esi + ecx + 0xb0], dl
jmp 0x4f83c0
mov dword [esi + 0x20], edx
mov ecx, dword [ebp + 0x10]
cmp dword [esi + 0x24], 0
jle 0x4f84c4
mov dword [esi], 0
movss xmm0, dword [0x56a120]
pxor xmm1, xmm1
movaps xmm2, xmmword [0x56a130]
jmp 0x4f8430
mov eax, dword [esi]
add eax, 1
mov dword [esi], eax
cmp eax, dword [esi + 0x24]
je 0x4f84af
cmp dword [esi + 0x18], 0
jle 0x4f8420
mov eax, dword [esi + 0x28]
mov edx, dword [esi]
mov ecx, dword [eax + edx*4]
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
mov edx, dword [eax + edx*4]
xor edi, edi
jmp 0x4f845e
mov byte [ecx + 1], al
add ecx, 2
add edi, 1
cmp dword [esi + 0x18], edi
je 0x4f8420
movzx ebx, byte [edx + edi*4]
test byte [esi + 0x1c], 1
jne 0x4f849d
movzx eax, bl
xorps xmm3, xmm3
cvtsi2ss xmm3, eax
movzx eax, word [edx + edi*4 + 1]
movd xmm4, eax
mulss xmm3, xmm0
punpcklbw xmm4, xmm1
punpcklwd xmm4, xmm1
cvtdq2ps xmm4, xmm4
mulps xmm4, xmm2
addss xmm3, xmm4
shufps xmm4, xmm4, 0x55
addss xmm4, xmm3
cvttss2si ebx, xmm4
movzx eax, byte [edx + edi*4 + 3]
mov byte [ecx], bl
cmp byte [esi + 0xc], 0
je 0x4f8450
add ecx, 1
jmp 0x4f8456
mov dword [esi], 0
xor edx, edx
mov ecx, dword [ebp + 0x10]
jmp 0x4f8518
mov ecx, dword [ebp + 0x10]
mov edx, dword [esi + 8]
jmp 0x4f8518
mov dword [esi], 0
xor edx, edx
jmp 0x4f8518
push eax
push dword [esi + 0x50]
push str._s:_forcing_image_to_gray__max_deviation___d__n
call fcn.004f70b0
add esp, 0xc
mov eax, ebx
shl al, 2
xor al, 4
movzx eax, al
mov edx, dword [esi + 8]
mov dword [esi + 0x20], eax
test eax, eax
mov ecx, dword [ebp + 0x10]
je 0x4f83fb
cmp al, 3
je 0x4f82cf
mov dword [esi], 0
mov edx, 0
cmp al, 4
mov ecx, dword [ebp + 0x10]
je 0x4f83fb
mov dword [esi + 8], edx
mov eax, dword [esi + 0xc]
xor al, 1
mov dword [esi + 0xc], eax
mov eax, dword [ecx + 0xd8]
test eax, eax
jne 0x4f8537
mov eax, dword [ecx + 0xdc]
test eax, eax
je 0x4f8563
mov dword [esi + 0x1bc], 0
push 0
lea ecx, [esi + 0x1bc]
push ecx
push eax
call sub.api_ms_win_crt_convert_l1_1_0.dll_strtol
add esp, 0xc
mov ecx, dword [esi + 0x1bc]
cmp byte [ecx], 0
jne 0x4f858f
cmp eax, 0x11
jge 0x4f858f
mov eax, dword [ebp + 0xc]
cmp byte [eax + 0xc], 0
mov ebx, dword [esi + 0x20]
je 0x4f8592
cmp ebx, 3
mov edi, dword [esi + 0x14]
jne 0x4f8595
cmp byte [esi + 0xc], 0
je 0x4f8853
mov dword [esi + 0x20], 6
mov ebx, 6
jmp 0x4f8595
mov ebx, dword [esi + 0x20]
mov edi, dword [esi + 0x14]
push 0
push 0
push 0
push ebx
push 8
mov eax, dword [ebp + 0xc]
push dword [eax + 4]
push dword [eax]
mov eax, dword [ebp + 8]
push eax
push edi
call fcn.0052bd20
add esp, 0x24
mov dword [esi + 0x1c], ebx
cmp ebx, 3
jne 0x4f85f1
push dword [esi]
lea eax, [esi + 0x9bc]
push eax
mov ebx, dword [ebp + 8]
push ebx
push edi
call fcn.0052c310
add esp, 0x10
cmp byte [esi + 0xc], 0
je 0x4f85ed
lea eax, [esi + 0xb0]
push 0
push dword [esi + 8]
push eax
push ebx
push edi
call fcn.0052c950
add esp, 0x14
push 0
jmp 0x4f85f6
push 0xf8
push 0
push edi
call fcn.00520fe0
add esp, 0xc
mov edi, dword [ebp + 0xc]
cmp byte [edi + 0xc], 0
je 0x4f8783
mov al, byte [edi + 0x3c]
xor ecx, ecx
mov byte [esi + 0x3c], al
test al, al
mov eax, 0x56a52b
mov edx, 0x56a51b
cmove edx, eax
mov dword [esi + 0xc], edx
lea eax, [esi + 0x84]
lea ebx, [esi + 0x98]
cmove ebx, eax
sete cl
mov dword [esi], ecx
mov byte [ebx + 4], 0
mov dword [ebx], 0x6354706e
lea ecx, [edi + 0x10]
mov dword [esi + 0x38], ecx
push dword [edi + 0x38]
push dword [edi + 0x34]
push dword [edi + 0x30]
push ecx
call fcn.0040a290
add esp, 0x10
mov edi, eax
mov ecx, eax
mov dword [esi + 0x30], eax
call fcn.0040a110
mov dword [ebx + 8], edi
mov edi, dword [esi + 0x38]
mov ecx, edi
call fcn.0040a270
mov dword [ebx + 0xc], eax
mov ecx, edi
call fcn.0040a270
mov ebx, eax
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov edi, eax
push ebx
push dword [esi + 0x30]
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
push edi
call fcn.0040a6f0
add esp, 4
push edi
mov edi, dword [ebp + 0xc]
call fcn.00439b84
add esp, 4
mov byte [esi + 0x74], 0
mov dword [esi + 0x70], 0x6c4f706e
push 1
push 0x18
call sub.api_ms_win_crt_heap_l1_1_0.dll_calloc
add esp, 8
mov dword [esi + 0x30], esp
mov dword [esi + 0x78], eax
sub esp, 0x18
mov ecx, esp
movups xmm0, xmmword [edi + 0x50]
movups xmmword [ecx], xmm0
movd xmm1, dword [edi + 0x60]
movd dword [ecx + 0x10], xmm1
movzx edx, byte [edi + 0x64]
mov dword [ecx + 0x14], edx
movups xmmword [eax], xmm0
movsd xmm0, qword [ecx + 0x10]
movsd qword [eax + 0x10], xmm0
mov dword [esi + 0x7c], 0x18
cmp byte [edi + 0x3c], 0
je 0x4f8738
mov byte [esi + 0x88], 0
mov dword [esi + 0x84], 0x624c706e
push 1
push 0x10
call sub.api_ms_win_crt_heap_l1_1_0.dll_calloc
add esp, 8
mov dword [esi + 0x8c], eax
movups xmm0, xmmword [edi + 0x40]
movups xmmword [eax], xmm0
mov dword [esi + 0x90], 0x10
mov edi, dword [esi]
xor edi, 3
mov byte [esi + 0x80], 1
mov byte [esi + 0x94], 1
cmp byte [esi + 0x3c], 0
mov eax, dword [esi + 0x14]
je 0x4f875b
mov byte [esi + 0xa8], 1
push edi
push dword [esi + 0xc]
push 3
push eax
mov ebx, eax
call fcn.0052cde0
add esp, 0x10
lea eax, [esi + 0x70]
push edi
push eax
push dword [ebp + 8]
push ebx
call fcn.0052cba0
add esp, 0x10
mov esp, dword [esi + 0x30]
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
push ebx
push dword [esi + 0x14]
call fcn.005202e0
add esp, 8
mov edx, dword [esi + 0x1c]
mov ecx, edx
and ecx, 0xfffffffb
mov eax, dword [esi + 0x28]
cmp ecx, 2
jne 0x4f87b9
cmp edx, 2
jne 0x4f87b6
push 1
push 0
push dword [esi + 0x14]
call fcn.0052ab20
add esp, 0xc
mov eax, dword [edi + 8]
push eax
mov ebx, edi
mov edi, dword [esi + 0x14]
push edi
call fcn.00520e20
add esp, 8
push dword [ebp + 8]
push edi
call fcn.00520700
add esp, 8
cmp dword [ebx + 4], 0
mov ebx, dword [esi + 0x28]
jle 0x4f87f6
xor edi, edi
nop
push dword [ebx + edi*4]
call fcn.00439b84
mov eax, dword [ebp + 0xc]
add esp, 4
add edi, 1
cmp edi, dword [eax + 4]
jl 0x4f87e0
push ebx
call fcn.00439b84
add esp, 4
push dword [esi + 0x78]
call fcn.00439b84
add esp, 4
push dword [esi + 0x8c]
call fcn.00439b84
add esp, 4
push dword [esi + 0xa0]
call fcn.00439b84
add esp, 4
lea eax, [esi + 0x5c]
lea ecx, [esi + 0x60]
lea edx, [esi + 0x20]
lea edi, [esi + 0x64]
lea ebx, [esi + 0x68]
push 0
push eax
push ecx
push edx
push edi
push ebx
lea eax, [esi + 0x6c]
push eax
push dword [ebp + 8]
push dword [esi + 0x14]
call fcn.005240a0
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [esi + 0x20], 2
mov ebx, 2
jmp 0x4f8595
push str.Cant_allocate_output_buffer__n
call fcn.004f70b0
add esp, 4
push 1
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
nop dword [eax + eax]