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

Disassembly:
sub esp, 0x58
mov eax, dword [esp + 0x70]
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x48], ecx
test eax, eax
mov edi, eax
jg 0x5b9d2a
mov edi, 1
test eax, eax
mov dword [esp + 0x10], edi
jge 0x5b9d3d
neg eax
mov dword [esp + 0x80], eax
jmp 0x5b9d48
mov dword [esp + 0x80], 1
mov ebp, dword [esp + 0x6c]
mov esi, dword [ecx]
mov cl, byte [esp + 0x7c]
mov eax, dword [ebp + 0x58]
lea ebx, [esi + 0xa]
shr eax, 3
test cl, cl
mov dword [esp + 0x20], eax
je 0x5b9d65
neg eax
mov dword [esp + 0x2c], eax
mov al, cl
neg al
sbb eax, eax
mov edx, dword [ebp + 0xc]
and al, 0xfe
mov dword [esp + 0x24], edx
inc eax
mov dword [esp + 0x34], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x28], eax
mov ax, word [esi]
and eax, 0x7fff
mov dword [esp + 0x6c], eax
xor eax, eax
mov ax, word [esi + 2]
imul eax, edi
fld dword [0x5fca1c]
fsub dword [esp + 0x84]
fstp dword [esp + 0x14]
mov edi, dword [esp + 0x80]
cdq
idiv edi
mov dword [esp + 0x7c], eax
movsx eax, word [esi + 4]
imul eax, dword [esp + 0x10]
cdq
idiv edi
mov edx, dword [esp + 0x78]
sub edx, eax
movsx eax, word [esi + 6]
imul eax, dword [esp + 0x34]
imul eax, dword [esp + 0x10]
mov dword [esp + 0x78], edx
cdq
idiv edi
mov edx, dword [esp + 0x74]
sub edx, eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x74], edx
mov edx, dword [esp + 0x78]
cmp edx, eax
jge 0x5ba47c
mov eax, dword [esp + 0x6c]
mov edi, dword [esp + 0x10]
imul eax, edi
mov esi, dword [esp + 0x80]
cdq
idiv esi
add eax, dword [esp + 0x78]
js 0x5ba47c
mov eax, dword [esp + 0x74]
test cl, cl
je 0x5b9e42
test eax, eax
jl 0x5ba47c
mov edx, dword [esp + 0x7c]
mov ecx, dword [esp + 0x28]
sub eax, edx
cmp eax, ecx
jl 0x5b9e5a
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x58
ret 0x1c
cmp eax, dword [esp + 0x28]
jge 0x5ba47c
mov ecx, dword [esp + 0x7c]
add ecx, eax
test ecx, ecx
jl 0x5ba47c
mov eax, dword [ebp]
cmp eax, 2
sete cl
test cl, cl
mov byte [esp + 0x7c], cl
jne 0x5b9f1d
mov ecx, dword [ebp + 0x80]
test ecx, ecx
je 0x5b9ee5
test eax, eax
jne 0x5b9ee5
mov edx, dword [ecx]
push eax
lea eax, [ebp + 4]
push 0x821
push eax
push 0
push ecx
call dword [edx + 0x64]
test eax, eax
jge 0x5b9eb1
push str.GXCanvas::lockWrite___Lock.
push eax
push 3
push 0xc
push 0x8b
push str...incgxcanvas.h
call fcn.004565c0
add esp, 0x18
jmp 0x5b9eb8
mov dword [ebp], 2
mov eax, dword [ebp + 0x28]
test eax, eax
jne 0x5b9ee5
mov ecx, dword [0x624270]
push str.mDesc.lpSurface__0
push 0
push 0
push ecx
push 0xc
push 0xc
push 0x90
push str...incgxcanvas.h
call fcn.00456580
add esp, 0x20
cmp dword [ebp], 2
je 0x5b9f1d
mov edx, dword [0x624270]
push str.GXLLE::draw___Lock.
push 0
push 0
push edx
push 0xc
push 0xc
push 0x122
push str.C:_aqua_srcgxgxlleblend.cpp
call fcn.00456580
add esp, 0x20
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret 0x1c
cmp esi, 2
jne 0x5b9f4b
mov eax, dword [esp + 0x48]
mov ecx, dword [eax]
movsx edx, word [ecx + 4]
and edx, 0x80000001
jns 0x5b9f39
dec edx
or edx, 0xfffffffe
inc edx
je 0x5b9f4b
xor eax, eax
mov al, byte [ebx]
inc ebx
test eax, eax
je 0x5b9f47
lea ebx, [ebx + eax*2]
dec dword [esp + 0x6c]
mov eax, dword [esp + 0x78]
lea ecx, [edi + eax]
test ecx, ecx
jg 0x5b9f8f
jmp 0x5b9f5f
mov esi, dword [esp + 0x80]
mov eax, dword [esp + 0x6c]
sub eax, esi
mov dword [esp + 0x6c], eax
js 0x5b9f8f
test esi, esi
jle 0x5b9f85
mov esi, dword [esp + 0x80]
xor eax, eax
mov al, byte [ebx]
inc ebx
test eax, eax
je 0x5b9f82
lea ebx, [ebx + eax*2]
dec esi
jne 0x5b9f76
mov dword [esp + 0x78], ecx
add ecx, edi
test ecx, ecx
jle 0x5b9f58
mov esi, dword [ebp + 0x14]
mov eax, dword [esp + 0x78]
mov edx, dword [esp + 0x20]
mov ecx, esi
imul edx, dword [esp + 0x74]
imul ecx, eax
add ecx, edx
mov edx, dword [ebp + 0x28]
add ecx, edx
mov byte [esp + 0x58], 0
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x24]
cmp eax, ecx
mov byte [esp + 0x59], 0
mov byte [esp + 0x5a], 0
mov byte [esp + 0x5b], 0
jge 0x5ba426
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x6c]
sub ecx, eax
mov dword [esp + 0x6c], ecx
js 0x5ba426
test edi, edi
mov dword [esp + 0x38], ebx
jle 0x5ba416
mov dword [esp + 0x48], edi
mov eax, dword [esp + 0x78]
mov ebx, dword [esp + 0x38]
test eax, eax
jl 0x5ba3cf
cmp eax, dword [esp + 0x24]
jge 0x5ba3cf
mov edx, dword [esp + 0x74]
mov esi, dword [esp + 0x1c]
xor ecx, ecx
xor eax, eax
mov cl, byte [ebx]
inc ebx
test ecx, ecx
mov dword [esp + 0x18], edx
je 0x5ba39b
mov dword [esp + 0x44], ecx
xor ecx, ecx
mov cl, byte [ebx]
inc ebx
test ecx, ecx
je 0x5ba06f
mov dword [esp + 0x30], ecx
mov ecx, eax
inc eax
test ecx, ecx
jne 0x5ba055
mov ecx, dword [esp + 0x2c]
imul ecx, edi
add esi, ecx
mov ecx, dword [esp + 0x34]
imul ecx, edi
add edx, ecx
cmp eax, dword [esp + 0x80]
jl 0x5ba060
xor eax, eax
mov ecx, dword [esp + 0x30]
dec ecx
mov dword [esp + 0x30], ecx
jne 0x5ba03c
mov dword [esp + 0x18], edx
xor ecx, ecx
mov cl, byte [ebx]
inc ebx
test ecx, ecx
mov dword [esp + 0x54], ebx
je 0x5ba38c
mov dword [esp + 0x40], ecx
mov edx, eax
inc eax
test edx, edx
mov dword [esp + 0x50], eax
jne 0x5ba36a
mov eax, dword [esp + 0x10]
lea ebx, [esi + 1]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x18]
test eax, eax
jl 0x5ba339
mov ecx, dword [esp + 0x28]
cmp eax, ecx
jge 0x5ba339
fld dword [esp + 0x84]
fcomp dword [0x5feae0]
mov edi, esi
fnstsw ax
test ah, 0x40
je 0x5ba16f
mov eax, dword [esp + 0x20]
sub eax, 3
je 0x5ba144
dec eax
je 0x5ba11b
mov eax, dword [ebp + 0x88]
xor ecx, ecx
mov cx, word [esi]
mov edx, dword [ebp + 0x84]
mov edi, ecx
and edx, ecx
shr edi, 1
mov dword [esp + 0x4c], edi
and edi, eax
mov ebx, edi
and edx, edi
shr ebx, 1
and ebx, eax
add ebx, edx
mov edx, dword [esp + 0x4c]
and eax, edx
add ebx, eax
mov word [esi], bx
mov ebx, dword [esp + 0x30]
jmp 0x5ba339
mov edx, dword [esi]
mov edi, dword [ebp + 0x88]
mov ecx, dword [ebp + 0x84]
mov eax, edx
shr eax, 1
and eax, edi
and ecx, edx
mov edx, eax
and ecx, eax
shr edx, 1
and edx, edi
add eax, edx
add ecx, eax
mov dword [esi], ecx
jmp 0x5ba339
xor eax, eax
mov al, byte [esi]
lea eax, [eax + eax*2]
sar eax, 2
mov byte [esi], al
xor eax, eax
mov al, byte [ebx]
lea ecx, [eax + eax*2]
xor eax, eax
sar ecx, 2
mov byte [ebx], cl
mov al, byte [ebx + 1]
lea edx, [eax + eax*2]
sar edx, 2
mov byte [ebx + 1], dl
jmp 0x5ba339
fld dword [esp + 0x84]
fcomp dword [0x5fdf9c]
fnstsw ax
test ah, 0x40
mov eax, dword [esp + 0x20]
je 0x5ba1d5
sub eax, 3
je 0x5ba1ba
dec eax
je 0x5ba1b2
mov edx, dword [ebp + 0x88]
xor eax, eax
mov ax, word [esi]
mov ecx, eax
shr ecx, 1
and ecx, edx
mov edx, dword [ebp + 0x94]
and edx, eax
or ecx, edx
mov word [esi], cx
jmp 0x5ba339
mov al, byte [esi]
mov edi, ebx
shr al, 1
mov byte [esi], al
mov al, byte [edi]
shr al, 1
mov byte [edi], al
mov cl, byte [edi + 1]
inc edi
shr cl, 1
mov byte [edi], cl
mov al, byte [edi + 1]
shr al, 1
mov byte [edi + 1], al
jmp 0x5ba339
sub eax, 3
je 0x5ba2f2
dec eax
je 0x5ba2d9
xor ecx, ecx
lea eax, [esp + 0x58]
mov cx, word [esi]
push eax
push ecx
mov ecx, ebp
call fcn.005be230
mov edx, dword [esp + 0x58]
and edx, 0xff
mov dword [esp + 0x4c], edx
fild dword [esp + 0x4c]
fmul dword [esp + 0x14]
call fcn.005f0c88
mov byte [esp + 0x60], al
mov eax, dword [esp + 0x59]
and eax, 0xff
mov dword [esp + 0x4c], eax
fild dword [esp + 0x4c]
fmul dword [esp + 0x14]
call fcn.005f0c88
mov ecx, dword [esp + 0x5a]
mov byte [esp + 0x61], al
and ecx, 0xff
mov dword [esp + 0x4c], ecx
fild dword [esp + 0x4c]
fmul dword [esp + 0x14]
call fcn.005f0c88
mov byte [esp + 0x62], al
mov eax, dword [esp + 0x62]
mov ebx, dword [ebp + 0x64]
and eax, 0xff
mov edi, dword [ebp + 0x60]
cdq
push edx
push eax
push 0
push ebx
call fcn.005f1d80
push 0
push 0xff
push edx
push eax
call fcn.005f1f10
mov ecx, eax
mov eax, dword [esp + 0x61]
and eax, 0xff
and ecx, ebx
cdq
push edx
push eax
push 0
push edi
mov ebx, ecx
call fcn.005f1d80
push 0
push 0xff
push edx
push eax
call fcn.005f1f10
and eax, edi
or ebx, eax
mov eax, dword [esp + 0x60]
mov edi, dword [ebp + 0x5c]
and eax, 0xff
cdq
push edx
push eax
push 0
push edi
call fcn.005f1d80
push 0
push 0xff
push edx
push eax
call fcn.005f1f10
and eax, edi
or ebx, eax
mov word [esi], bx
mov ebx, dword [esp + 0x30]
jmp 0x5ba339
xor edx, edx
mov dl, byte [esi]
mov dword [esp + 0x4c], edx
fild dword [esp + 0x4c]
fmul dword [esp + 0x14]
call fcn.005f0c88
mov byte [esi], al
mov edi, ebx
xor eax, eax
mov al, byte [edi]
mov dword [esp + 0x4c], eax
fild dword [esp + 0x4c]
fmul dword [esp + 0x14]
call fcn.005f0c88
mov byte [edi], al
inc edi
xor ecx, ecx
mov cl, byte [edi]
mov dword [esp + 0x4c], ecx
fild dword [esp + 0x4c]
fmul dword [esp + 0x14]
call fcn.005f0c88
mov byte [edi], al
inc edi
xor edx, edx
mov dl, byte [edi]
mov dword [esp + 0x4c], edx
fild dword [esp + 0x4c]
fmul dword [esp + 0x14]
call fcn.005f0c88
mov byte [edi], al
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x18]
add esi, eax
add ebx, eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x30], ebx
add ecx, eax
mov eax, dword [esp + 0x3c]
dec eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x3c], eax
jne 0x5ba0a2
mov eax, dword [esp + 0x50]
mov ebx, dword [esp + 0x54]
cmp eax, dword [esp + 0x80]
jl 0x5ba375
xor eax, eax
mov ecx, dword [esp + 0x40]
dec ecx
mov dword [esp + 0x40], ecx
jne 0x5ba084
mov edi, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x44]
dec ecx
mov dword [esp + 0x44], ecx
jne 0x5ba02f
mov esi, dword [ebp + 0x14]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x78]
add edx, esi
inc ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x78], ecx
mov ecx, dword [esp + 0x80]
cmp ecx, 1
jle 0x5ba403
dec ecx
xor eax, eax
mov al, byte [ebx]
inc ebx
test eax, eax
je 0x5ba3ca
lea ebx, [ebx + eax*2]
dec ecx
jne 0x5ba3be
jmp 0x5ba403
mov edx, dword [esp + 0x1c]
add edx, esi
inc eax
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x80]
test eax, eax
mov dword [esp + 0x1c], edx
jle 0x5ba403
mov edi, eax
xor eax, eax
mov al, byte [ebx]
inc ebx
test eax, eax
je 0x5ba400
inc ebx
xor ecx, ecx
dec eax
mov cl, byte [ebx]
lea ebx, [ebx + ecx + 1]
jne 0x5ba3f4
dec edi
jne 0x5ba3eb
mov eax, dword [esp + 0x48]
mov edi, dword [esp + 0x10]
dec eax
mov dword [esp + 0x48], eax
jne 0x5b9ff6
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x78]
cmp eax, edx
jl 0x5b9fcf
mov al, byte [esp + 0x7c]
test al, al
jne 0x5ba47c
mov eax, dword [ebp + 0x80]
test eax, eax
je 0x5ba47c
cmp dword [ebp], 0
je 0x5ba47c
mov ecx, dword [eax]
push 0
push eax
call dword [ecx + 0x80]
test eax, eax
jge 0x5ba475
push str.GXCanvas::unlockSurface___Unlock.
push eax
push 3
push 0xc
push 0x9d
push str...incgxcanvas.h
call fcn.004565c0
add esp, 0x18
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret 0x1c
mov dword [ebp], 0
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x58
ret 0x1c