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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xc0
mov qword [rsp + 0xb0], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov r15, rdx
mov rbx, rcx
xor r14d, r14d
mov esi, r14d
mov dword [rsp + 0x110], r14d
mov dword [rcx + 8], r14d
lea rax, [0x0079c690]
mov qword [rcx], rax
mov qword [rcx + 0x18], r14
mov qword [rcx + 0x20], r14
mov dword [rcx + 0x10], r14d
mov dword [rcx + 0x14], r14d
call fcn.0052373c
cmp al, r14b
je 0x52406c
lea r13d, [r14 + 0x18]
mov rcx, r13
call sub.gdiplus.dll_GdipAlloc
mov rdi, rax
lea r12, [0x0079c6f0]
cmp rax, r14
je 0x523a82
mov rdx, r15
lea rcx, [rsp + 0x60]
call fcn.00401f00
lea esi, [r14 + 1]
mov rcx, qword [rax + 0x48]
mov qword [rdi], r12
mov qword [rsp + 0x110], r14
lea rdx, [rsp + 0x110]
call sub.gdiplus.dll_GdipCreateBitmapFromFile
mov dword [rdi + 0x10], eax
mov rax, qword [rsp + 0x110]
mov qword [rdi + 8], rax
jmp 0x523a85
mov rdi, r14
mov qword [rbx + 0x18], rdi
mov ebp, 0x100
test sil, 1
je 0x523ace
and esi, 0xfffffffe
lea rax, [rsp + 0x60]
mov rcx, qword [rsp + 0xa8]
cmp rcx, rax
je 0x523ace
cmp rcx, r14
je 0x523ace
mov rax, qword [rsp + 0x60]
sub rax, rcx
sar rax, 1
lea rdx, [rax + rax]
cmp rdx, rbp
jbe 0x523ac9
call fcn.006a4944
jmp 0x523ace
call fcn.006a3610
mov rcx, rbx
call fcn.005238d8
mov rdi, qword [rbx + 0x18]
cmp rdi, r14
je 0x523b2f
lea rdx, [rsp + 0x110]
mov rcx, qword [rdi + 8]
call sub.gdiplus.dll_GdipGetImagePixelFormat
cmp eax, r14d
je 0x523af8
mov dword [rdi + 0x10], eax
cmp dword [rsp + 0x110], 0x22009
jne 0x523b2f
mov rdx, r15
lea rcx, [rsp + 0x60]
call fcn.0044a36c
or esi, 2
lea rdx, [0x00798584]
mov rcx, qword [rax + 0x28]
call fcn.006a525c
cmp eax, r14d
jne 0x523b2f
mov dil, 1
jmp 0x523b32
mov dil, r14b
test sil, 2
je 0x523b6b
and esi, 0xfffffffd
lea rax, [rsp + 0x60]
mov rcx, qword [rsp + 0x88]
cmp rcx, rax
je 0x523b6b
cmp rcx, r14
je 0x523b6b
mov rdx, qword [rsp + 0x60]
sub rdx, rcx
cmp rdx, rbp
jbe 0x523b66
call fcn.006a4944
jmp 0x523b6b
call fcn.006a3610
cmp dil, r14b
je 0x523df0
mov rdi, qword [rbx + 0x18]
mov dword [rsp + 0x110], r14d
lea rdx, [rsp + 0x110]
mov rcx, qword [rdi + 8]
call sub.gdiplus.dll_GdipGetImageWidth
cmp eax, r14d
je 0x523b99
mov dword [rdi + 0x10], eax
mov rdi, qword [rbx + 0x18]
mov dword [rsp + 0x118], r14d
lea rdx, [rsp + 0x118]
mov rcx, qword [rdi + 8]
call sub.gdiplus.dll_GdipGetImageHeight
cmp eax, r14d
je 0x523bbe
mov dword [rdi + 0x10], eax
mov dword [rsp + 0x30], r14d
mov dword [rsp + 0x34], r14d
mov ebp, dword [rsp + 0x110]
mov dword [rsp + 0x38], ebp
mov r12d, dword [rsp + 0x118]
mov dword [rsp + 0x3c], r12d
mov rdi, qword [rbx + 0x18]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r9d, 0x22009
mov r8d, 1
lea rdx, [rsp + 0x30]
mov rcx, qword [rdi + 8]
call sub.gdiplus.dll_GdipBitmapLockBits
cmp eax, r14d
je 0x523c10
mov dword [rdi + 0x10], eax
mov rcx, r13
call sub.gdiplus.dll_GdipAlloc
mov r13, rax
cmp rax, r14
je 0x523c6a
lea rax, [0x0079c6f0]
mov qword [r13], rax
mov qword [rsp + 0x110], r14
lea rax, [rsp + 0x110]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r14
mov r9d, 0x26200a
xor r8d, r8d
mov edx, r12d
mov ecx, ebp
call sub.gdiplus.dll_GdipCreateBitmapFromScan0
mov dword [r13 + 0x10], eax
mov rax, qword [rsp + 0x110]
mov qword [r13 + 8], rax
jmp 0x523c6d
mov r13, r14
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov r9d, 0x26200a
mov r8d, 2
lea rdx, [rsp + 0x30]
mov rcx, qword [r13 + 8]
call sub.gdiplus.dll_GdipBitmapLockBits
cmp eax, r14d
je 0x523c9a
mov dword [r13 + 0x10], eax
mov r10b, r14b
mov r11, qword [rsp + 0x50]
mov r14d, dword [rsp + 0x48]
mov r12d, dword [rsp + 0x40]
mov edx, dword [rsp + 0x44]
test edx, edx
je 0x523d2c
mov ebp, r12d
shl ebp, 2
mov r9d, 3
mov rdi, rdx
test ebp, ebp
je 0x523ce4
mov ecx, r9d
lea r8d, [rbp - 1]
shr r8d, 2
inc r8d
mov eax, ecx
or r10b, byte [rax + r11]
add ecx, 4
sub r8, 1
jne 0x523cd5
add r9d, r14d
sub rdi, 1
jne 0x523cc3
test r10b, r10b
je 0x523d2c
mov r8d, r12d
shl r8d, 2
mov edx, edi
imul edx, r14d
add rdx, r11
mov ecx, dword [rsp + 0x68]
imul ecx, edi
add rcx, qword [rsp + 0x70]
call fcn.006a4bf0
inc edi
cmp edi, dword [rsp + 0x44]
jae 0x523d93
mov r11, qword [rsp + 0x50]
mov r14d, dword [rsp + 0x48]
mov r12d, dword [rsp + 0x40]
jmp 0x523cf2
mov edi, dword [r11]
xor r9d, r9d
test edx, edx
je 0x523d93
mov ecx, r9d
imul ecx, r14d
add rcx, r11
mov r8d, r9d
imul r8d, dword [rsp + 0x68]
add r8, qword [rsp + 0x70]
xor r10d, r10d
test r12d, r12d
je 0x523d8b
sub r8, rcx
mov eax, dword [rcx]
cmp eax, edi
jne 0x523d63
xor eax, eax
jmp 0x523d68
or eax, 0xff000000
mov dword [r8 + rcx], eax
inc r10d
add rcx, 4
mov r12d, dword [rsp + 0x40]
cmp r10d, r12d
jb 0x523d59
mov r11, qword [rsp + 0x50]
mov r14d, dword [rsp + 0x48]
mov edx, dword [rsp + 0x44]
inc r9d
cmp r9d, edx
jb 0x523d36
mov rdi, qword [rbx + 0x18]
lea rdx, [rsp + 0x40]
mov rcx, qword [rdi + 8]
call sub.gdiplus.dll_GdipBitmapUnlockBits
xor r14d, r14d
cmp eax, r14d
je 0x523db0
mov dword [rdi + 0x10], eax
lea rdx, [rsp + 0x60]
mov rcx, qword [r13 + 8]
call sub.gdiplus.dll_GdipBitmapUnlockBits
cmp eax, r14d
je 0x523dc7
mov dword [r13 + 0x10], eax
mov rcx, qword [rbx + 0x18]
cmp rcx, r14
je 0x523dda
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov qword [rbx + 0x18], r13
mov ebp, 0x100
mov r13d, 0x18
lea r12, [0x0079c6f0]
mov rdi, qword [rbx + 0x18]
cmp rdi, r14
je 0x523e49
lea rdx, [rsp + 0x110]
mov rcx, qword [rdi + 8]
call sub.gdiplus.dll_GdipGetImagePixelFormat
cmp eax, r14d
je 0x523e12
mov dword [rdi + 0x10], eax
cmp dword [rsp + 0x110], 0x21808
jne 0x523e49
mov rdx, r15
lea rcx, [rsp + 0x60]
call fcn.0044a36c
or esi, 4
lea rdx, [0x00798584]
mov rcx, qword [rax + 0x28]
call fcn.006a525c
cmp eax, r14d
jne 0x523e49
mov dil, 1
jmp 0x523e4c
mov dil, r14b
test sil, 4
je 0x523e82
lea rax, [rsp + 0x60]
mov rcx, qword [rsp + 0x88]
cmp rcx, rax
je 0x523e82
cmp rcx, r14
je 0x523e82
mov rdx, qword [rsp + 0x60]
sub rdx, rcx
cmp rdx, rbp
jbe 0x523e7d
call fcn.006a4944
jmp 0x523e82
call fcn.006a3610
cmp dil, r14b
je 0x52406c
mov rdi, qword [rbx + 0x18]
mov dword [rsp + 0x110], r14d
lea rdx, [rsp + 0x110]
mov rcx, qword [rdi + 8]
call sub.gdiplus.dll_GdipGetImageWidth
cmp eax, r14d
je 0x523eb0
mov dword [rdi + 0x10], eax
mov rdi, qword [rbx + 0x18]
mov dword [rsp + 0x118], r14d
lea rdx, [rsp + 0x118]
mov rcx, qword [rdi + 8]
call sub.gdiplus.dll_GdipGetImageHeight
cmp eax, r14d
je 0x523ed5
mov dword [rdi + 0x10], eax
mov dword [rsp + 0x30], r14d
mov dword [rsp + 0x34], r14d
mov esi, dword [rsp + 0x110]
mov dword [rsp + 0x38], esi
mov ebp, dword [rsp + 0x118]
mov dword [rsp + 0x3c], ebp
mov rdi, qword [rbx + 0x18]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r9d, 0x22009
mov r8d, 1
lea rdx, [rsp + 0x30]
mov rcx, qword [rdi + 8]
call sub.gdiplus.dll_GdipBitmapLockBits
cmp eax, r14d
je 0x523f25
mov dword [rdi + 0x10], eax
mov rcx, r13
call sub.gdiplus.dll_GdipAlloc
mov rdi, rax
cmp rax, r14
je 0x523f75
mov qword [rax], r12
mov qword [rsp + 0x110], r14
lea rax, [rsp + 0x110]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r14
mov r9d, 0x26200a
xor r8d, r8d
mov edx, ebp
mov ecx, esi
call sub.gdiplus.dll_GdipCreateBitmapFromScan0
mov dword [rdi + 0x10], eax
mov rax, qword [rsp + 0x110]
mov qword [rdi + 8], rax
jmp 0x523f78
mov rdi, r14
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov r9d, 0x26200a
mov r8d, 2
lea rdx, [rsp + 0x30]
mov rcx, qword [rdi + 8]
call sub.gdiplus.dll_GdipBitmapLockBits
cmp eax, r14d
je 0x523fa4
mov dword [rdi + 0x10], eax
mov r10, qword [rsp + 0x50]
mov ebp, dword [r10]
mov r12d, 0xffffff
and ebp, r12d
mov r8d, r14d
mov edx, dword [rsp + 0x44]
cmp edx, r14d
jbe 0x524025
mov r11d, dword [rsp + 0x40]
mov ecx, dword [rsp + 0x48]
imul ecx, r8d
add rcx, r10
mov r9d, dword [rsp + 0x68]
imul r9d, r8d
add r9, qword [rsp + 0x70]
mov esi, r14d
cmp r11d, r14d
jbe 0x52401d
sub r9, rcx
mov edx, dword [rcx]
mov eax, edx
and eax, r12d
cmp eax, ebp
jne 0x523ffa
mov edx, r14d
jmp 0x524000
or edx, 0xff000000
mov dword [r9 + rcx], edx
inc esi
add rcx, 4
mov r11d, dword [rsp + 0x40]
cmp esi, r11d
jb 0x523fea
mov r10, qword [rsp + 0x50]
mov edx, dword [rsp + 0x44]
inc r8d
cmp r8d, edx
jb 0x523fc6
mov rsi, qword [rbx + 0x18]
lea rdx, [rsp + 0x40]
mov rcx, qword [rsi + 8]
call sub.gdiplus.dll_GdipBitmapUnlockBits
cmp eax, r14d
je 0x52403f
mov dword [rsi + 0x10], eax
lea rdx, [rsp + 0x60]
mov rcx, qword [rdi + 8]
call sub.gdiplus.dll_GdipBitmapUnlockBits
cmp eax, r14d
je 0x524055
mov dword [rdi + 0x10], eax
mov rcx, qword [rbx + 0x18]
cmp rcx, r14
je 0x524068
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov qword [rbx + 0x18], rdi
mov rax, rbx
mov rbx, qword [rsp + 0x108]
add rsp, 0xc0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret