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

Disassembly:
sub esp, 0x3c4
push esi
mov esi, dword [esp + 0x3cc]
mov eax, dword [esi + 0x584]
test eax, eax
je 0x61d556
push 0
push 0
push eax
call fcn.00490160
add esp, 0xc
test eax, eax
mov dword [esp + 0x20], eax
je 0x61d556
mov dl, byte [eax + 0x4a]
mov esi, dword [esi + 0x68c]
xor ecx, ecx
cmp dl, 0x20
sete cl
test esi, esi
mov dword [esp + 0x1c], ecx
jne 0x61d563
mov eax, 1
pop esi
add esp, 0x3c4
ret
push ebx
push ebp
push edi
push 0x798534
call fcn.0043dbc0
add esp, 4
push 0
push eax
mov ecx, esi
call fcn.0060fc70
test eax, eax
je 0x61d586
mov ebp, dword [eax + 4]
jmp 0x61d588
xor ebp, ebp
push 0x798524
call fcn.0043dbc0
add esp, 4
push 0
push eax
mov ecx, esi
call fcn.0060fc70
test eax, eax
je 0x61d5a8
mov ebx, dword [eax + 4]
jmp 0x61d5aa
xor ebx, ebx
push str.BLUE
call fcn.0043dbc0
add esp, 4
push 0
push eax
mov ecx, esi
call fcn.0060fc70
test eax, eax
je 0x61d5ca
mov edi, dword [eax + 4]
jmp 0x61d5cc
xor edi, edi
push str.GLOSS
call fcn.0043dbc0
add esp, 4
push 0
push eax
mov ecx, esi
call fcn.0060fc70
test eax, eax
je 0x61d5ec
mov eax, dword [eax + 4]
jmp 0x61d5ee
xor eax, eax
shl eax, 8
or eax, edi
shl eax, 8
or eax, ebx
shl eax, 8
or eax, ebp
mov dword [esp + 0x14], eax
mov dword [esp + 0x34], 0x44
mov dword [esp + 0x38], 0x45
mov dword [esp + 0x3c], 0x46
mov dword [esp + 0x40], 0x47
mov dword [esp + 0x44], 0x48
mov dword [esp + 0x48], 0x4b
mov dword [esp + 0x4c], 0x4c
xor edi, edi
jmp 0x61d640
mov eax, dword [esp + edi + 0x34]
mov edx, dword [esp + 0x3d8]
mov esi, dword [edx + eax*4 + 0x590]
xor ebp, ebp
cmp esi, ebp
je 0x61d72a
push 0x798534
call fcn.0043dbc0
add esp, 4
push ebp
push eax
mov ecx, esi
call fcn.0060fc70
cmp eax, ebp
je 0x61d67f
mov eax, dword [eax + 4]
mov dword [esp + 0x10], eax
jmp 0x61d683
mov dword [esp + 0x10], ebp
push 0x798524
call fcn.0043dbc0
add esp, 4
push ebp
push eax
mov ecx, esi
call fcn.0060fc70
cmp eax, ebp
je 0x61d6a0
mov ebp, dword [eax + 4]
push str.BLUE
call fcn.0043dbc0
add esp, 4
push 0
push eax
mov ecx, esi
call fcn.0060fc70
test eax, eax
je 0x61d6c0
mov ebx, dword [eax + 4]
jmp 0x61d6c2
xor ebx, ebx
push str.GLOSS
call fcn.0043dbc0
add esp, 4
push 0
push eax
mov ecx, esi
call fcn.0060fc70
test eax, eax
je 0x61d6e2
mov eax, dword [eax + 4]
jmp 0x61d6e4
xor eax, eax
cmp dword [esp + edi + 0x34], 0x48
jne 0x61d707
mov ecx, dword [esp + 0x3d8]
mov ecx, dword [ecx + 0x618]
test ecx, ecx
je 0x61d720
mov dl, byte [ecx + 5]
shr dl, 5
cmp dl, 3
jl 0x61d720
mov ecx, dword [esp + 0x10]
shl eax, 8
or eax, ebx
shl eax, 8
or eax, ebp
shl eax, 8
or eax, ecx
mov dword [esp + edi + 0x50], eax
jmp 0x61d732
mov eax, dword [esp + 0x14]
mov dword [esp + edi + 0x50], eax
jmp 0x61d732
mov ecx, dword [esp + 0x14]
mov dword [esp + edi + 0x50], ecx
add edi, 4
cmp edi, 0x1c
jl 0x61d640
xor ebp, ebp
mov ecx, 0x68
xor eax, eax
lea edi, [esp + 0x234]
lea ebx, [esp + 0x234]
mov dword [esp + 0x18], ebp
rep stosd dword es:[edi], eax
mov dword [esp + 0x10], ebp
mov dword [esp + 0x1c], ebx
cmp ebp, 1
jl 0x61d848
cmp ebp, 5
jge 0x61d84b
cmp ebp, 1
mov eax, dword [esp + 0x3d8]
mov esi, dword [eax + ebp*4 + 0x68c]
jle 0x61d79c
add eax, 0x690
lea ecx, [ebp - 1]
cmp dword [eax], esi
jne 0x61d796
xor esi, esi
add eax, 4
dec ecx
jne 0x61d790
test esi, esi
je 0x61d818
mov edx, dword [esp + 0x3d8]
dec ebp
push ebp
push edx
call fcn.0061d3a0
push str.NUMCOLOURS
mov dword [ebx], eax
call fcn.0043dbc0
mov cx, word [esi + 0xa]
add esp, 0xc
cmp cx, 0xffff
je 0x61d807
mov edx, dword [0x8a1cc8]
mov esi, dword [edx + 0x14]
movzx ecx, cx
movsx edi, word [esi + ecx*2]
lea ecx, [esi + ecx*2]
xor esi, esi
test edi, edi
jle 0x61d807
mov ebp, dword [edx + 0x1c]
add ecx, 2
jmp 0x61d7f0
test eax, eax
movsx edx, word [ecx]
lea edx, [ebp + edx*8]
je 0x61d83f
cmp dword [edx], eax
je 0x61d83f
inc esi
add ecx, 2
cmp esi, edi
jl 0x61d7f0
xor edx, edx
test edx, edx
mov dword [ebx + 0x1c], edx
je 0x61dad0
mov ebp, dword [esp + 0x10]
mov esi, dword [ebx]
test esi, esi
je 0x61da4a
push 0
push 0
push esi
call fcn.00490160
mov edi, eax
add esp, 0xc
test edi, edi
mov dword [ebx + 4], edi
jne 0x61d87a
mov dword [ebx], eax
jmp 0x61da4a
test edx, edx
je 0x61d807
mov edx, dword [edx + 4]
jmp 0x61d809
cmp ebp, 5
jne 0x61d868
mov eax, dword [esp + 0x3d8]
push eax
call fcn.006128f0
add esp, 4
mov dword [ebx], eax
mov dword [ebx + 0x1c], 0x10
jmp 0x61d818
test ebp, ebp
jne 0x61d818
mov dword [ebx], ebp
mov dword [ebx + 0x1c], 0x10
jmp 0x61da4a
push esi
push str._MASK
call fcn.0043dbf0
push 0
push 0
push eax
call fcn.00490160
mov esi, eax
add esp, 0x14
test esi, esi
mov dword [ebx + 8], esi
jne 0x61d8a2
mov dword [ebx], eax
jmp 0x61da4a
push 0
mov ecx, edi
call fcn.005b93c0
mov ebp, eax
mov eax, dword [esp + 0x28]
test eax, eax
mov dword [ebx + 0xc], ebp
jne 0x61d8c4
push 0
mov ecx, edi
call fcn.005b9400
mov dword [ebx + 0x10], eax
test ebp, ebp
jne 0x61d8cf
mov dword [ebx], ebp
jmp 0x61da46
push 0
mov ecx, esi
call fcn.005b93c0
mov edi, eax
mov eax, dword [esp + 0x28]
test eax, eax
mov dword [ebx + 0x14], edi
jne 0x61d8f1
push 0
mov ecx, esi
call fcn.005b9400
mov dword [ebx + 0x18], eax
test edi, edi
jne 0x61d8fc
mov dword [ebx], edi
jmp 0x61da46
mov edi, dword [esp + 0x10]
cmp edi, 1
jl 0x61da36
cmp edi, 5
jge 0x61da36
mov ebp, dword [esp + 0x3d8]
mov esi, dword [ebp + edi*4 + 0x68c]
test esi, esi
je 0x61da36
push str.REMAP
call fcn.0043dbc0
add esp, 4
push eax
mov ecx, esi
call fcn.0061b260
test eax, eax
je 0x61da36
push 0
push str.REMAP
call fcn.0043dbc0
add esp, 4
push eax
mov ecx, esi
call fcn.0061b280
test eax, eax
mov dword [ebx + 0x20], eax
je 0x61da36
lea eax, [edi - 1]
xor ecx, ecx
shl eax, 4
lea ebp, [eax + ebp + 0x6c4]
mov dword [esp + 0x20], ecx
lea edi, [ebx + 0x24]
mov dword [esp + 0x24], ebp
mov esi, dword [ebp]
test esi, esi
je 0x61da0f
push 0
push 0x798534
call fcn.0043dbc0
add esp, 4
push eax
mov ecx, esi
call fcn.0061b280
push 0
push 0x798524
mov ebx, eax
call fcn.0043dbc0
add esp, 4
push eax
mov ecx, esi
call fcn.0061b280
push 0
push str.BLUE
mov ebp, eax
call fcn.0043dbc0
add esp, 4
push eax
mov ecx, esi
call fcn.0061b280
push 0
push str.GLOSS
mov dword [esp + 0x38], eax
call fcn.0043dbc0
add esp, 4
push eax
mov ecx, esi
call fcn.0061b280
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x20]
shl eax, 8
or eax, edx
shl eax, 8
or eax, ebp
shl eax, 8
or eax, ebx
mov ebx, dword [esp + 0x1c]
mov dword [edi], eax
jmp 0x61da18
mov edx, 0xff
shl edx, cl
mov dword [edi], edx
mov ebp, dword [esp + 0x24]
add ecx, 8
add ebp, 4
add edi, 4
cmp ecx, 0x20
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], ecx
jl 0x61d981
mov ecx, dword [esp + 0x18]
inc ecx
add ebx, 0x34
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ebx
mov ebp, dword [esp + 0x10]
inc ebp
cmp ebp, 8
mov dword [esp + 0x10], ebp
jl 0x61d763
call fcn.004022d0
mov esi, dword [esp + 0x3d8]
push esi
call fcn.00634120
push esi
call fcn.0061ddc0
mov ecx, dword [esp + 0x20]
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x238], ecx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], eax
mov ecx, 7
lea esi, [esp + 0x58]
lea edi, [esp + 0x7c]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x68
lea esi, [esp + 0x23c]
lea edi, [esp + 0x98]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebx + 0x24]
lea esi, [eax - 0x530b82b0]
add esp, 8
cmp esi, 5
mov ebp, 1
ja case.default.0x61db1f
jmp dword [esi*4 + 0x61dbd8]
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 0x3c4
ret
mov eax, 0x89f050
jmp 0x61db05
mov eax, 0x89f218
jmp 0x61db05
mov eax, 0x89f3e0
jmp 0x61db05
mov eax, 0x89f5a8
jmp 0x61db05
mov eax, 0x89f770
jmp 0x61db05
mov eax, 0x89f938
lea edx, [esp + 0x6c]
push edx
push eax
call fcn.006116f0
movzx eax, al
add esp, 8
test eax, eax
jne 0x61db7a
cmp esi, 5
ja case.default.0x61db1f
jmp dword [esi*4 + 0x61dbf0]
mov edi, 0x89f050
jmp 0x61db4e
mov edi, 0x89f218
jmp 0x61db4e
mov edi, 0x89f3e0
jmp 0x61db4e
mov edi, 0x89f5a8
jmp 0x61db4e
mov edi, 0x89f770
jmp 0x61db4e
mov edi, 0x89f938
mov ecx, 0x72
lea esi, [esp + 0x6c]
rep movsd dword es:[edi], dword [esi]
cmp byte [ebx + 0x4a], 8
jne 0x61db6b
lea eax, [esp + 0x6c]
push eax
call fcn.00612000
jmp 0x61db75
lea ecx, [esp + 0x6c]
push ecx
call fcn.00611c90
add esp, 4
mov ebp, eax
lea esi, [esp + 0x244]
mov edi, 8
mov eax, dword [esi - 4]
test eax, eax
je 0x61db96
mov ecx, dword [esi - 0xc]
push eax
call fcn.005b93f0
mov eax, dword [esi]
test eax, eax
je 0x61dba5
mov ecx, dword [esi - 0xc]
push eax
call fcn.004031f0
mov eax, dword [esi + 4]
test eax, eax
je 0x61dbb5
mov ecx, dword [esi - 8]
push eax
call fcn.005b93f0
mov eax, dword [esi + 8]
test eax, eax
je 0x61dbc5
mov ecx, dword [esi - 8]
push eax
call fcn.004031f0
add esi, 0x34
dec edi
jne 0x61db86
pop edi
mov eax, ebp
pop ebp
pop ebx
pop esi
add esp, 0x3c4
ret