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

Disassembly:
sub esp, 0x58
mov eax, dword [esp + 0x60]
push ebx
push ebp
push esi
mov edx, dword [eax + 0x28]
mov eax, dword [esp + 0x7c]
test eax, eax
push edi
mov dword [esp + 0x40], ecx
mov dword [esp + 0x48], edx
mov ebp, eax
jg 0x5b9435
mov ebp, 1
test eax, eax
mov dword [esp + 0x80], ebp
jge 0x5b9448
neg eax
mov dword [esp + 0x70], eax
jmp 0x5b9450
mov dword [esp + 0x70], 1
mov esi, dword [esp + 0x6c]
mov edi, dword [ecx]
mov cl, byte [esp + 0x7c]
mov eax, dword [esi + 0x58]
lea ebx, [edi + 0xa]
shr eax, 3
test cl, cl
mov dword [esp + 0x24], eax
je 0x5b946d
neg eax
mov dword [esp + 0x28], eax
mov al, cl
neg al
sbb eax, eax
mov edx, dword [esi + 0xc]
and al, 0xfe
mov dword [esp + 0x1c], edx
inc eax
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 0x10]
mov dword [esp + 0x20], eax
mov ax, word [edi]
and eax, 0x7fff
mov dword [esp + 0x6c], eax
xor eax, eax
mov ax, word [edi + 2]
imul eax, ebp
mov ebp, dword [esp + 0x70]
cdq
idiv ebp
mov dword [esp + 0x7c], eax
movsx eax, word [edi + 4]
imul eax, dword [esp + 0x80]
cdq
idiv ebp
mov edx, dword [esp + 0x78]
sub edx, eax
movsx eax, word [edi + 6]
imul eax, dword [esp + 0x2c]
imul eax, dword [esp + 0x80]
mov dword [esp + 0x78], edx
cdq
idiv ebp
mov edx, dword [esp + 0x74]
sub edx, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x74], edx
mov edx, dword [esp + 0x78]
cmp edx, eax
jge 0x5b9d02
mov eax, dword [esp + 0x6c]
mov edi, dword [esp + 0x78]
imul eax, dword [esp + 0x80]
cdq
idiv ebp
add eax, edi
js 0x5b9d02
mov eax, dword [esp + 0x74]
test cl, cl
je 0x5b9538
test eax, eax
jl 0x5b9d02
mov edx, dword [esp + 0x7c]
mov ecx, dword [esp + 0x20]
sub eax, edx
cmp eax, ecx
jl 0x5b9550
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x58
ret 0x1c
cmp eax, dword [esp + 0x20]
jge 0x5b9d02
mov ecx, dword [esp + 0x7c]
add ecx, eax
test ecx, ecx
jl 0x5b9d02
mov eax, dword [esi]
cmp eax, 2
sete cl
test cl, cl
mov byte [esp + 0x7c], cl
jne 0x5b960d
mov ecx, dword [esi + 0x80]
test ecx, ecx
je 0x5b95d9
test eax, eax
jne 0x5b95d9
mov edx, dword [ecx]
push eax
lea eax, [esi + 4]
push 0x821
push eax
push 0
push ecx
call dword [edx + 0x64]
test eax, eax
jge 0x5b95a6
push str.GXCanvas::lockWrite___Lock.
push eax
push 3
push 0xc
push 0x8b
push str...incgxcanvas.h
call fcn.004565c0
add esp, 0x18
jmp 0x5b95ac
mov dword [esi], 2
mov eax, dword [esi + 0x28]
test eax, eax
jne 0x5b95d9
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 [esi], 2
je 0x5b960d
mov edx, dword [0x624270]
push str.GXLLE::draw___Lock.
push 0
push 0
push edx
push 0xc
push 0xc
push 0x59
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 ebp, 2
jne 0x5b9644
mov eax, dword [esp + 0x40]
mov ecx, dword [eax]
movsx edx, word [ecx + 4]
and edx, 0x80000001
jns 0x5b9629
dec edx
or edx, 0xfffffffe
inc edx
je 0x5b9644
xor eax, eax
mov al, byte [ebx]
inc ebx
test eax, eax
je 0x5b9640
inc ebx
xor ecx, ecx
dec eax
mov cl, byte [ebx]
lea ebx, [ebx + ecx + 1]
jne 0x5b9634
dec dword [esp + 0x6c]
mov edx, dword [esp + 0x80]
add edi, edx
test edi, edi
jg 0x5b9690
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x6c]
sub ecx, eax
mov dword [esp + 0x6c], ecx
js 0x5b9690
test eax, eax
jle 0x5b967f
mov ebp, eax
xor eax, eax
mov al, byte [ebx]
inc ebx
test eax, eax
je 0x5b967c
inc ebx
xor ecx, ecx
dec eax
mov cl, byte [ebx]
lea ebx, [ebx + ecx + 1]
jne 0x5b9670
dec ebp
jne 0x5b9667
mov edx, dword [esp + 0x80]
mov dword [esp + 0x78], edi
add edi, edx
test edi, edi
jle 0x5b9651
mov ebp, dword [esi + 0x14]
mov edx, dword [esp + 0x78]
mov ecx, dword [esp + 0x24]
mov eax, ebp
imul ecx, dword [esp + 0x74]
imul eax, edx
add eax, ecx
mov ecx, dword [esi + 0x28]
add eax, ecx
mov byte [esp + 0x60], 0
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x1c]
cmp edx, eax
mov byte [esp + 0x61], 0
mov byte [esp + 0x62], 0
mov byte [esp + 0x63], 0
mov byte [esp + 0x58], 0
mov byte [esp + 0x59], 0
mov byte [esp + 0x5a], 0
mov byte [esp + 0x5b], 0
jge 0x5b9cae
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x70]
mov edi, dword [esp + 0x6c]
sub edi, ecx
mov dword [esp + 0x6c], edi
js 0x5b9cae
test eax, eax
mov dword [esp + 0x30], ebx
jle 0x5b9ca4
mov dword [esp + 0x40], eax
mov ebx, dword [esp + 0x30]
test edx, edx
jl 0x5b9c5d
cmp edx, dword [esp + 0x1c]
jge 0x5b9c5d
mov eax, dword [esp + 0x74]
mov edi, dword [esp + 0x14]
mov ebp, ebx
xor ecx, ecx
mov dword [esp + 0x10], eax
xor eax, eax
mov cl, byte [ebp]
lea ebx, [ebp + 1]
test ecx, ecx
je 0x5b9c27
mov dword [esp + 0x3c], ecx
mov ebp, dword [esp + 0x80]
xor ecx, ecx
mov cl, byte [ebx]
inc ebx
test ecx, ecx
je 0x5b9791
mov dword [esp + 0x18], ecx
mov ecx, eax
inc eax
test ecx, ecx
jne 0x5b977e
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
imul edx, ebp
imul ecx, ebp
add edi, edx
mov edx, dword [esp + 0x10]
add edx, ecx
mov dword [esp + 0x10], edx
cmp eax, dword [esp + 0x70]
jl 0x5b9786
xor eax, eax
mov ecx, dword [esp + 0x18]
dec ecx
mov dword [esp + 0x18], ecx
jne 0x5b975d
xor ecx, ecx
mov cl, byte [ebx]
inc ebx
test ecx, ecx
je 0x5b9c14
mov dword [esp + 0x38], ecx
mov dl, byte [ebx]
inc ebx
mov ecx, eax
inc eax
test ecx, ecx
mov byte [esp + 0x44], dl
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], eax
jne 0x5b9bfd
mov eax, dword [esp + 0x80]
lea edx, [edi + 1]
mov dword [esp + 0x18], edx
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x10]
test eax, eax
jl 0x5b9bc8
mov ecx, dword [esp + 0x20]
cmp eax, ecx
jge 0x5b9bc8
fld dword [esp + 0x84]
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x48]
fcomp dword [0x5fdf9c]
and edx, 0xff
mov ebx, edi
lea ebp, [eax + edx*4]
fnstsw ax
test ah, 0x40
mov eax, dword [esp + 0x24]
je 0x5b9976
sub eax, 3
je 0x5b9945
dec eax
je 0x5b9933
xor edx, edx
lea ecx, [esp + 0x58]
mov dx, word [edi]
push ecx
push edx
mov ecx, esi
call fcn.005be230
xor ecx, ecx
lea eax, [esp + 0x60]
mov cl, byte [ebp]
push eax
push ecx
mov ecx, esi
call fcn.005be230
mov dl, byte [esp + 0x60]
mov al, byte [esp + 0x58]
mov cl, byte [esp + 0x61]
mov ebx, dword [esi + 0x68]
shr dl, 1
shr al, 1
add dl, al
mov al, byte [esp + 0x62]
mov byte [esp + 0x60], dl
mov dl, byte [esp + 0x59]
shr cl, 1
shr dl, 1
add cl, dl
mov ebp, dword [esi + 0x64]
mov byte [esp + 0x61], cl
mov cl, byte [esp + 0x5a]
shr al, 1
shr cl, 1
add al, cl
push 0
mov byte [esp + 0x66], al
mov eax, dword [esp + 0x67]
and eax, 0xff
push ebx
cdq
push edx
push eax
call fcn.005f1d80
push 0
push 0xff
push edx
push eax
call fcn.005f1f10
mov ecx, eax
mov eax, dword [esp + 0x62]
and eax, 0xff
push 0
cdq
push ebp
and ecx, ebx
push edx
push eax
mov dword [esp + 0x5c], ecx
call fcn.005f1d80
push 0
push 0xff
push edx
push eax
call fcn.005f1f10
and eax, ebp
mov ebp, dword [esp + 0x4c]
mov ebx, dword [esi + 0x60]
or ebp, eax
mov eax, dword [esp + 0x61]
push 0
and eax, 0xff
push ebx
cdq
push edx
push eax
call fcn.005f1d80
push 0
push 0xff
push edx
push eax
call fcn.005f1f10
and eax, ebx
mov ebx, dword [esi + 0x5c]
or ebp, eax
mov eax, dword [esp + 0x60]
push 0
and eax, 0xff
push ebx
cdq
push edx
push eax
call fcn.005f1d80
push 0
push 0xff
push edx
push eax
call fcn.005f1f10
and eax, ebx
or ebp, eax
mov word [edi], bp
jmp 0x5b9bc8
mov dl, byte [ebp]
mov al, byte [edi]
mov ebx, dword [esp + 0x18]
shr dl, 1
shr al, 1
add dl, al
inc ebp
mov byte [edi], dl
mov cl, byte [ebx]
mov dl, byte [ebp]
shr cl, 1
shr dl, 1
add cl, dl
mov byte [ebx], cl
mov al, byte [ebx + 1]
mov cl, byte [ebp + 1]
inc ebx
inc ebp
shr al, 1
shr cl, 1
add al, cl
mov byte [ebx], al
mov dl, byte [ebp + 1]
mov al, byte [ebx + 1]
inc ebx
shr dl, 1
shr al, 1
add dl, al
mov byte [ebx], dl
jmp 0x5b9bc8
sub eax, 3
je 0x5b9b35
dec eax
je 0x5b9afa
xor edx, edx
lea ecx, [esp + 0x58]
mov dx, word [edi]
push ecx
push edx
mov ecx, esi
call fcn.005be230
xor ecx, ecx
lea eax, [esp + 0x60]
mov cx, word [ebp]
push eax
push ecx
mov ecx, esi
call fcn.005be230
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0x58]
fld dword [0x5fca1c]
fsub dword [esp + 0x84]
and edx, 0xff
and eax, 0xff
mov dword [esp + 0x4c], edx
fild dword [esp + 0x4c]
mov dword [esp + 0x4c], eax
fmul dword [esp + 0x84]
fild dword [esp + 0x4c]
fmul st(2)
faddp st(1)
call fcn.005f0c88
mov ecx, dword [esp + 0x61]
mov edx, dword [esp + 0x59]
and ecx, 0xff
and edx, 0xff
mov dword [esp + 0x4c], ecx
mov byte [esp + 0x60], al
fild dword [esp + 0x4c]
mov dword [esp + 0x4c], edx
fmul dword [esp + 0x84]
fild dword [esp + 0x4c]
fmul st(2)
faddp st(1)
call fcn.005f0c88
mov ecx, dword [esp + 0x5a]
mov byte [esp + 0x61], al
mov eax, dword [esp + 0x62]
and ecx, 0xff
and eax, 0xff
mov dword [esp + 0x4c], eax
fild dword [esp + 0x4c]
mov dword [esp + 0x4c], ecx
fmul dword [esp + 0x84]
fild dword [esp + 0x4c]
fmul st(2)
faddp st(1)
call fcn.005f0c88
mov ebx, dword [esi + 0x68]
mov byte [esp + 0x62], al
mov eax, dword [esp + 0x63]
mov ebp, dword [esi + 0x64]
and eax, 0xff
push 0
cdq
fstp st(0)
push ebx
push edx
push eax
call fcn.005f1d80
push 0
push 0xff
push edx
push eax
call fcn.005f1f10
mov ecx, eax
mov eax, dword [esp + 0x62]
and ecx, ebx
and eax, 0xff
push 0
push ebp
cdq
push edx
push eax
mov dword [esp + 0x5c], ecx
call fcn.005f1d80
push 0
push 0xff
push edx
push eax
call fcn.005f1f10
and eax, ebp
mov ebp, dword [esp + 0x4c]
or ebp, eax
mov eax, dword [esp + 0x61]
mov ebx, dword [esi + 0x60]
and eax, 0xff
cdq
push edx
push eax
push 0
push ebx
call fcn.005f1d80
push 0
push 0xff
push edx
push eax
call fcn.005f1f10
and eax, ebx
mov ebx, dword [esi + 0x5c]
or ebp, eax
mov eax, dword [esp + 0x60]
and eax, 0xff
cdq
push edx
push eax
push 0
push ebx
jmp 0x5b9914
fld dword [0x5fca1c]
fsub dword [esp + 0x84]
xor edx, edx
xor eax, eax
mov dl, byte [edi]
mov al, byte [ebp]
mov dword [esp + 0x4c], edx
fimul dword [esp + 0x4c]
mov dword [esp + 0x4c], eax
fild dword [esp + 0x4c]
fmul dword [esp + 0x84]
faddp st(1)
call fcn.005f0c88
mov ebx, dword [esp + 0x18]
mov byte [edi], al
inc ebp
fld dword [0x5fca1c]
fsub dword [esp + 0x84]
xor ecx, ecx
xor edx, edx
mov cl, byte [ebp]
mov dl, byte [ebx]
mov dword [esp + 0x4c], ecx
fild dword [esp + 0x4c]
mov dword [esp + 0x4c], edx
fmul dword [esp + 0x84]
fild dword [esp + 0x4c]
fmul st(2)
faddp st(1)
call fcn.005f0c88
mov byte [ebx], al
inc ebx
inc ebp
xor eax, eax
xor ecx, ecx
mov al, byte [ebp]
mov cl, byte [ebx]
mov dword [esp + 0x4c], eax
fild dword [esp + 0x4c]
mov dword [esp + 0x4c], ecx
fmul dword [esp + 0x84]
fild dword [esp + 0x4c]
fmul st(2)
faddp st(1)
call fcn.005f0c88
xor edx, edx
mov byte [ebx], al
mov dl, byte [ebp + 1]
inc ebx
mov dword [esp + 0x4c], edx
xor eax, eax
fild dword [esp + 0x4c]
mov al, byte [ebx]
mov dword [esp + 0x4c], eax
fmul dword [esp + 0x84]
fild dword [esp + 0x4c]
fmul st(2)
faddp st(1)
call fcn.005f0c88
fstp st(0)
mov byte [ebx], al
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x10]
add edi, eax
add ebx, eax
mov eax, dword [esp + 0x34]
add edx, ecx
dec eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], edx
mov dword [esp + 0x34], eax
jne 0x5b97ce
mov ebx, dword [esp + 0x50]
mov eax, dword [esp + 0x54]
cmp eax, dword [esp + 0x70]
jl 0x5b9c05
xor eax, eax
mov ecx, dword [esp + 0x38]
dec ecx
mov dword [esp + 0x38], ecx
jne 0x5b97a2
mov ecx, dword [esp + 0x3c]
dec ecx
mov dword [esp + 0x3c], ecx
jne 0x5b9749
mov edx, dword [esp + 0x78]
mov ebp, dword [esi + 0x14]
mov edi, dword [esp + 0x14]
add edi, ebp
inc edx
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x70]
cmp edi, 1
mov dword [esp + 0x78], edx
jle 0x5b9c8e
dec edi
xor eax, eax
mov al, byte [ebx]
inc ebx
test eax, eax
je 0x5b9c58
inc ebx
xor ecx, ecx
dec eax
mov cl, byte [ebx]
lea ebx, [ebx + ecx + 1]
jne 0x5b9c4c
dec edi
jne 0x5b9c43
jmp 0x5b9c8e
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x70]
add edi, ebp
inc edx
test eax, eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x78], edx
jle 0x5b9c8e
mov edi, eax
xor eax, eax
mov al, byte [ebx]
inc ebx
test eax, eax
je 0x5b9c8b
inc ebx
xor ecx, ecx
dec eax
mov cl, byte [ebx]
lea ebx, [ebx + ecx + 1]
jne 0x5b9c7f
dec edi
jne 0x5b9c76
mov eax, dword [esp + 0x40]
dec eax
mov dword [esp + 0x40], eax
jne 0x5b970f
mov eax, dword [esp + 0x80]
cmp edx, dword [esp + 0x1c]
jl 0x5b96eb
mov al, byte [esp + 0x7c]
test al, al
jne 0x5b9d02
mov eax, dword [esi + 0x80]
test eax, eax
je 0x5b9d02
cmp dword [esi], 0
je 0x5b9d02
mov edx, dword [eax]
push 0
push eax
call dword [edx + 0x80]
test eax, eax
jge 0x5b9cfc
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 [esi], 0
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x58
ret 0x1c