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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa34
mov eax, dword [0x64e0a0]
xor eax, esp
mov dword [esp + 0xa30], eax
xor eax, eax
push ebx
push esi
mov byte [esp + 0xf], dl
mov dword [esp + 0x20], ecx
push edi
xor edx, edx
mov ecx, 0x651032
mov dword [esp + 0x18], 1
mov dword [esp + 0x34], 0
mov dword [esp + 0x100], 0x4034b50
mov dword [esp + 0x104], 0x14
mov dword [esp + 0x108], 8
mov word [esp + 0x10c], ax
mov dword [esp + 0x10e], eax
mov dword [esp + 0x112], eax
mov dword [esp + 0x116], eax
mov dword [esp + 0x11a], eax
mov dword [esp + 0x140], 0x2014b50
mov word [esp + 0x144], 0x14
mov dword [esp + 0x146], 0x14
mov dword [esp + 0x14a], 8
mov word [esp + 0x14e], ax
mov dword [esp + 0x150], eax
mov dword [esp + 0x154], eax
mov dword [esp + 0x158], eax
mov dword [esp + 0x15c], eax
mov dword [esp + 0x160], eax
mov word [esp + 0x164], ax
mov dword [esp + 0x166], eax
mov dword [esp + 0x16a], eax
mov dword [esp + 0x170], 0x6054b50
mov dword [esp + 0x174], eax
mov dword [esp + 0x178], 0x10001
mov dword [esp + 0x17c], eax
mov dword [esp + 0x180], eax
mov word [esp + 0x184], ax
call fcn.0059c500
test eax, eax
je 0x597db9
cmp byte [ebp + 8], 0
jne 0x597db9
mov dword [esp + 0x34], 1
lea eax, [esp + 0x40c]
mov dword [esp + 0x400], eax
lea eax, [esp + 0x400]
push eax
movzx eax, byte [0x65c1e4]
push eax
mov ecx, 0x651032
mov dword [esp + 0x40c], 0x104
mov dword [esp + 0x410], 0
call fcn.005b0e80
add esp, 8
sub eax, 0
je 0x597eda
dec eax
mov eax, dword [esp + 0x400]
je 0x597e44
lea ecx, [esp + 0x40c]
cmp eax, ecx
je 0x598600
test eax, eax
je 0x598600
push eax
call fcn.00541b50
add esp, 4
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa30]
xor ecx, esp
call fcn.00541b41
mov esp, ebp
pop ebp
ret
xor esi, esi
push esi
push 0x80
push 4
push esi
push esi
push 0xc0000000
push eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0xf0], esi
call dword [0x649010]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x597fb6
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x597e88
cmp eax, 2
jne 0x597ecc
test esi, esi
jle 0x597ecc
mov eax, esi
cmp esi, 0xc8
jl 0x597e9b
mov eax, 0xc8
push eax
call edi
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
push dword [esp + 0x38]
sub esi, 0xc8
call dword [0x649010]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x597e78
jmp 0x597fb6
lea eax, [ebx + 1]
neg eax
sbb eax, eax
and ebx, eax
jmp 0x597fb6
push dword [esp + 0x400]
lea eax, [esp + 0xdc]
xor ebx, ebx
push eax
xor esi, esi
mov dword [esp + 0xcc], ebx
call fcn.0041e890
lea eax, [esp + 0xd8]
mov dword [esp + 0x98], ebx
mov dword [esp + 0xa4], ebx
mov dword [esp + 0xa8], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [esp + 0x94], 0x18
mov dword [esp + 0xa0], 0x40
mov dword [esp + 0x9c], eax
push 0
push 0
push 0x20
push 3
push 0
push 0x80
push 0
lea eax, [esp + 0x114]
push eax
lea eax, [esp + 0xb4]
push eax
push 0xc0100080
lea eax, [esp + 0x7c]
push eax
call fcn.0041edd6
mov edi, eax
test edi, edi
jns 0x597f9c
cmp edi, 0xc0000043
je 0x597f7e
cmp edi, 0xc000000f
jne 0x597f9c
test esi, esi
jle 0x597f9c
mov eax, esi
cmp esi, 0xc8
jl 0x597f91
mov eax, 0xc8
push eax
call ebx
sub esi, 0xc8
jmp 0x597f38
push edi
call fcn.0041e908
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, 0
test edi, edi
js 0x597fb6
mov ebx, dword [esp + 0x54]
mov eax, dword [esp + 0x400]
lea ecx, [esp + 0x40c]
cmp eax, ecx
je 0x597fd5
test eax, eax
je 0x597fd5
push eax
call fcn.00541b50
add esp, 4
test ebx, ebx
je 0x598600
cmp byte [ebp + 8], 0
je 0x598212
lea eax, [esp + 0x1f4]
mov dword [esp + 0x1e8], eax
lea eax, [esp + 0x1e8]
push eax
movzx eax, byte [0x65c1e4]
push eax
mov ecx, 0x651460
mov dword [esp + 0x1f4], 0x104
mov dword [esp + 0x1f8], 0
call fcn.005b0e80
add esp, 8
sub eax, 0
je 0x5980fa
dec eax
mov eax, dword [esp + 0x1e8]
je 0x59805e
lea ecx, [esp + 0x1f4]
cmp eax, ecx
je 0x598053
test eax, eax
je 0x598053
push eax
call fcn.00541b50
add esp, 4
xor edi, edi
mov dword [esp + 0x14], edi
jmp 0x598207
xor esi, esi
push esi
push 0x80
push 4
push esi
push esi
push 0xc0000000
push eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0xec], esi
call dword [0x649010]
mov edi, eax
mov dword [esp + 0x14], edi
cmp edi, 0xffffffff
jne 0x5981e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x5980a0
cmp eax, 2
jne 0x5980ec
test esi, esi
jle 0x5980ec
mov eax, esi
cmp esi, 0xc8
jl 0x5980b3
mov eax, 0xc8
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
push dword [esp + 0x38]
sub esi, 0xc8
call dword [0x649010]
mov edi, eax
mov dword [esp + 0x14], eax
cmp edi, 0xffffffff
je 0x598090
jmp 0x5981e8
lea eax, [edi + 1]
neg eax
sbb eax, eax
and edi, eax
jmp 0x5981e4
push dword [esp + 0x1e8]
lea eax, [esp + 0xcc]
xor esi, esi
xor edi, edi
push eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x78], esi
call fcn.0041e890
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0xc8]
mov dword [esp + 0xac], 0x18
mov dword [esp + 0xb0], esi
mov dword [esp + 0xb8], 0x40
mov dword [esp + 0xb4], eax
mov dword [esp + 0xbc], esi
mov dword [esp + 0xc0], esi
lea esp, [esp]
push 0
push 0
push 0x20
push 3
push 0
push 0x80
push 0
lea eax, [esp + 0x104]
push eax
lea eax, [esp + 0xcc]
push eax
push 0xc0100080
lea eax, [esp + 0x9c]
push eax
call fcn.0041edd6
mov dword [esp + 0x20], eax
test eax, eax
jns 0x5981c7
cmp eax, 0xc0000043
je 0x5981a9
cmp eax, 0xc000000f
jne 0x5981c7
test esi, esi
jle 0x5981c7
mov eax, esi
cmp esi, 0xc8
jl 0x5981bc
mov eax, 0xc8
push eax
call edi
sub esi, 0xc8
jmp 0x598160
push eax
call fcn.0041e908
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [esp + 0x20], 0
mov edi, 0
jl 0x5981e8
mov edi, dword [esp + 0x74]
mov dword [esp + 0x14], edi
mov eax, dword [esp + 0x1e8]
lea ecx, [esp + 0x1f4]
cmp eax, ecx
je 0x598207
test eax, eax
je 0x598207
push eax
call fcn.00541b50
add esp, 4
test edi, edi
jne 0x59821a
mov ecx, ebx
jmp 0x5985fb
mov edi, dword [esp + 0x70]
mov dword [esp + 0x14], edi
mov ecx, dword [esp + 0x24]
call fcn.00595820
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x59825f
push ebx
cmp byte [0x65c1e4], al
je 0x598248
call fcn.0041e90e
push eax
call fcn.0041e908
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x59824e
call dword [0x649008]
cmp byte [ebp + 8], 0
je 0x598600
mov ecx, edi
jmp 0x5985fb
cmp byte [0x65c1e4], 0
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
je 0x59831a
push 5
push 0x18
lea eax, [esp + 0x1c0]
push eax
lea eax, [esp + 0x84]
push eax
push ebx
call fcn.0041ec0e
test eax, eax
jns 0x5982a7
push eax
call fcn.0041e908
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
or edi, 0xffffffff
or eax, edi
jmp 0x59835a
mov eax, dword [esp + 0x1c4]
mov ecx, dword [esp + 0x1c0]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], eax
test eax, eax
jg 0x5982d9
jl 0x5982c7
test ecx, ecx
jae 0x5982d9
push 0x19
call dword [sym.imp.KERNEL32.dll_SetLastError]
or edi, 0xffffffff
or eax, edi
jmp 0x59835a
push 0xe
push 8
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x84]
push eax
push ebx
call fcn.0041ed62
mov esi, eax
push esi
call fcn.0041e908
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
jns 0x598310
or edi, 0xffffffff
or eax, edi
jmp 0x59835a
mov edi, dword [esp + 0x40]
mov eax, dword [esp + 0x44]
jmp 0x59835a
push 2
lea eax, [esp + 0x40]
push eax
push 0
push ebx
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
call esi
mov edi, eax
mov dword [esp + 0x38], edi
cmp edi, 0xffffffff
jne 0x598356
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x598352
or edi, edi
or eax, 0xffffffff
jmp 0x59835a
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
cmp byte [0x65c1e4], 0
mov dword [esp + 0x7c], eax
je 0x5983a6
push 0xe
push 8
lea eax, [esp + 0x90]
push eax
lea eax, [esp + 0xfc]
push eax
push ebx
mov dword [esp + 0x9c], 0
mov dword [esp + 0xa0], 0
call fcn.0041ed62
push eax
call fcn.0041e908
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x5983d1
push 0
lea eax, [esp + 0x60]
push eax
push 0
push ebx
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
call esi
mov dword [esp + 0x58], eax
cmp eax, 0xffffffff
jne 0x5983d1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov al, byte [ebp + 8]
mov esi, dword [esp + 0x14]
test al, al
je 0x598552
cmp byte [0x65c1e4], 0
je 0x598482
push 5
push 0x18
lea eax, [esp + 0x1d8]
push eax
lea eax, [esp + 0x74]
push eax
push esi
call fcn.0041ec0e
test eax, eax
jns 0x598425
push eax
call fcn.0041e908
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [esp + 0x18], 0xffffffff
or eax, 0xffffffff
jmp 0x5984d4
mov eax, dword [esp + 0x1dc]
mov ecx, dword [esp + 0x1d8]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], eax
test eax, eax
jg 0x598449
jl 0x598445
test ecx, ecx
jae 0x598449
push 0x19
jmp 0x59840f
push 0xe
push 8
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x74]
push eax
push esi
call fcn.0041ed62
mov esi, eax
push esi
call fcn.0041e908
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
mov esi, dword [esp + 0x14]
js 0x598415
mov eax, dword [esp + 0x48]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x4c]
jmp 0x5984d4
push 2
lea eax, [esp + 0x30]
push eax
push 0
push esi
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x28], ecx
cmp ecx, 0xffffffff
jne 0x5984d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x5984c8
mov dword [esp + 0x18], 0xffffffff
or eax, 0xffffffff
jmp 0x5984d4
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x18], ecx
mov eax, dword [esp + 0x2c]
cmp byte [0x65c1e4], 0
mov dword [esp + 0x6c], eax
je 0x598520
push 0xe
push 8
lea eax, [esp + 0x88]
push eax
lea eax, [esp + 0xec]
push eax
push esi
mov dword [esp + 0x94], 0
mov dword [esp + 0x98], 0
call fcn.0041ed62
push eax
call fcn.0041e908
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x59854f
push 0
lea eax, [esp + 0x68]
push eax
push 0
push esi
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x60], eax
cmp eax, 0xffffffff
jne 0x59854f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov al, byte [ebp + 8]
cmp byte [esp + 0x13], 0
je 0x59856a
test al, al
je 0x598565
mov eax, dword [esp + 0x18]
cmp edi, eax
jbe 0x598567
mov eax, edi
push eax
jmp 0x59856f
push 0x8000
call fcn.005421d4
add esp, 4
mov dword [esp + 0x28], eax
test eax, eax
je 0x5985e3
cmp edi, 1
jb 0x5985e3
mov ecx, dword [esp + 0x18]
cmp ecx, 1
jb 0x5985e3
cmp byte [esp + 0x13], 0
je 0x598b33
cmp dword [esp + 0x34], 0
jne 0x598b33
cmp byte [ebp + 8], 0
je 0x5985af
mov edx, ecx
cmp edi, ecx
jbe 0x5985b1
mov edx, edi
mov ecx, edx
mov eax, edx
shr eax, 0xc
shr ecx, 0xe
add ecx, edx
add eax, 0xb
add eax, ecx
push eax
mov dword [esp + 0x24], eax
call fcn.005421d4
add esp, 4
mov dword [esp + 0x34], eax
test eax, eax
jne 0x598617
push dword [esp + 0x28]
call fcn.00541b50
add esp, 4
mov ecx, ebx
call fcn.005b1c00
cmp byte [ebp + 8], 0
je 0x5985f7
mov ecx, esi
call fcn.005b1c00
mov ecx, dword [esp + 0x1c]
call fcn.005b1c00
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa30]
xor ecx, esp
call fcn.00541b41
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x28]
push edi
mov ecx, ebx
call fcn.005b1af0
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x38]
push edi
push dword [esp + 0x30]
lea edx, [esp + 0x3c]
mov dword [esp + 0x3c], eax
call fcn.0040d540
add esp, 0xc
test eax, eax
jne 0x598a83
lea edx, [esp + 0x10a]
lea ecx, [esp + 0x10c]
call fcn.00598d30
sub dword [esp + 0x30], 2
push 0
lea eax, [esp + 0x82c]
push 0x105
push eax
mov edx, 0x105
mov ecx, 0x651032
call fcn.00594c60
mov edx, dword [esp + 0x34]
add esp, 0xc
xor ecx, ecx
push edi
mov dword [esp + 0x112], 0
call fcn.0040d5e0
add esp, 4
mov dword [esp + 0x10e], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x112], eax
xor eax, eax
push eax
push eax
push 0x105
mov word [esp + 0x128], ax
lea eax, [esp + 0x72c]
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x83c]
push eax
push 0
push 0
mov dword [esp + 0x136], edi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea ecx, [esp + 0x720]
mov byte [esp + 0x824], 0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5986f3
mov edi, dword [esp + 0x1c]
sub ecx, edx
mov word [esp + 0x11a], cx
push 0x1e
lea edx, [esp + 0x104]
mov ecx, edi
call fcn.005b1b90
movzx eax, word [esp + 0x11e]
add esp, 4
lea edx, [esp + 0x720]
push eax
mov ecx, edi
call fcn.005b1b90
mov eax, dword [esp + 0x38]
add esp, 4
add eax, 2
push dword [esp + 0x30]
mov edx, eax
mov ecx, edi
mov dword [esp + 0x3c], eax
call fcn.005b1b90
add esp, 4
cmp byte [ebp + 8], 0
je 0x5988b2
mov edi, dword [esp + 0x28]
push dword [esp + 0x18]
mov edx, edi
mov ecx, esi
call fcn.005b1af0
push dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x3c]
push edi
lea edx, [esp + 0x3c]
mov dword [esp + 0x3c], eax
call fcn.0040d540
add esp, 0xc
test eax, eax
jne 0x5988ae
mov ecx, 7
lea esi, [esp + 0x100]
lea edi, [esp + 0x120]
rep movsd dword es:[edi], dword [esi]
lea edx, [esp + 0x12a]
lea ecx, [esp + 0x12c]
movsw word es:[edi], word [esi]
call fcn.00598d30
mov edi, dword [esp + 0x30]
push 0
lea eax, [esp + 0x82c]
push 0x105
sub edi, 2
push eax
mov edx, 0x105
mov ecx, 0x651460
mov dword [esp + 0x2c], edi
call fcn.00594c60
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x34]
add esp, 0xc
xor ecx, ecx
push esi
mov dword [esp + 0x132], 0
call fcn.0040d5e0
add esp, 4
mov dword [esp + 0x12e], eax
xor eax, eax
push eax
push eax
push 0x105
mov word [esp + 0x148], ax
lea eax, [esp + 0x624]
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x83c]
push eax
push 0
push 0
mov dword [esp + 0x152], edi
mov dword [esp + 0x156], esi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea ecx, [esp + 0x618]
mov byte [esp + 0x71c], 0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x598858
mov edi, dword [esp + 0x1c]
sub ecx, edx
mov word [esp + 0x13a], cx
push 0x1e
lea edx, [esp + 0x124]
mov ecx, edi
call fcn.005b1b90
movzx eax, word [esp + 0x13e]
add esp, 4
lea edx, [esp + 0x618]
push eax
mov ecx, edi
call fcn.005b1b90
mov edx, dword [esp + 0x3c]
add esp, 4
mov ecx, edi
push dword [esp + 0x20]
call fcn.005b1b90
add esp, 4
jmp 0x5988b2
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x10e]
mov dword [esp + 0x150], eax
mov eax, dword [esp + 0x112]
mov dword [esp + 0x154], eax
mov eax, dword [esp + 0x116]
mov dword [esp + 0x158], eax
movzx eax, word [esp + 0x11a]
mov word [esp + 0x15c], ax
movzx eax, word [esp + 0x10c]
mov word [esp + 0x14e], ax
movzx eax, word [esp + 0x10a]
push 0x2e
lea edx, [esp + 0x144]
mov ecx, edi
mov word [esp + 0x150], ax
call fcn.005b1b90
movzx eax, word [esp + 0x160]
add esp, 4
lea edx, [esp + 0x720]
push eax
mov ecx, edi
call fcn.005b1b90
add esp, 4
cmp byte [ebp + 8], 0
je 0x598a18
mov eax, dword [esp + 0x12e]
mov ecx, 0xb
lea esi, [esp + 0x140]
lea edi, [esp + 0x188]
rep movsd dword es:[edi], dword [esi]
movzx ecx, word [esp + 0x11a]
movsw word es:[edi], word [esi]
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x198], eax
mov eax, dword [esp + 0x132]
mov dword [esp + 0x19c], eax
mov eax, dword [esp + 0x136]
mov dword [esp + 0x1a0], eax
movzx eax, word [esp + 0x13a]
mov word [esp + 0x1a4], ax
movzx eax, word [esp + 0x12c]
mov word [esp + 0x196], ax
movzx eax, word [esp + 0x12a]
mov word [esp + 0x194], ax
mov eax, dword [esp + 0x112]
add ecx, 0x1e
add eax, ecx
push 0x2e
lea edx, [esp + 0x18c]
mov ecx, edi
mov dword [esp + 0x1b6], eax
call fcn.005b1b90
movzx eax, word [esp + 0x1a8]
add esp, 4
lea edx, [esp + 0x618]
push eax
mov ecx, edi
call fcn.005b1b90
mov cx, word [esp + 0x13e]
add esp, 4
mov dword [esp + 0x178], 0x20002
movzx esi, cx
jmp 0x598a22
mov cx, word [esp + 0x13a]
xor esi, esi
movzx edx, word [esp + 0x11a]
xor eax, eax
cmp byte [ebp + 8], al
setne al
inc eax
imul eax, eax, 0x2e
add eax, esi
add eax, edx
cmp byte [ebp + 8], 0
mov dword [esp + 0x17c], eax
je 0x598a58
mov eax, dword [esp + 0x132]
movzx ecx, cx
add eax, 0x1e
add eax, ecx
jmp 0x598a5a
xor eax, eax
lea ecx, [eax + edx]
mov eax, dword [esp + 0x112]
add eax, 0x1e
add eax, ecx
push 0x16
lea edx, [esp + 0x174]
mov ecx, edi
mov dword [esp + 0x184], eax
call fcn.005b1b90
add esp, 4
push dword [esp + 0x34]
call fcn.00541b50
add esp, 4
mov esi, dword [esp + 0x1c]
push dword [esp + 0x28]
call fcn.00541b50
add esp, 4
mov ecx, ebx
call fcn.005b1c00
mov bl, byte [ebp + 8]
test bl, bl
je 0x598ab6
mov ecx, dword [esp + 0x14]
call fcn.005b1c00
mov ecx, esi
call fcn.005b1c00
test bl, bl
jne 0x598c75
mov al, byte [0x650ce4]
cmp al, 2
jne 0x598be0
cmp byte [esp + 0x13], bl
jne 0x598bac
push 0x180
push 0x651032
call fcn.005444f8
add esp, 8
test eax, eax
jne 0x598aff
push 0x651032
call fcn.005445a9
add esp, 4
push dword [esp + 0x24]
mov byte [0x650ce4], 1
mov edx, 0x105
mov ecx, 0x651032
call fcn.005c1c20
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa30]
xor ecx, esp
call fcn.00541b41
mov esp, ebp
pop ebp
ret
mov esi, edi
shr esi, 0xf
and edi, 0x7fff
mov dword [esp + 0x38], edi
test esi, esi
jle 0x598b7f
mov edi, dword [esp + 0x28]
lea ebx, [ebx]
push 0x8000
mov edx, edi
mov ecx, ebx
call fcn.005b1af0
mov ecx, dword [esp + 0x20]
add esp, 4
mov edx, edi
push 0x8000
call fcn.005b1b90
add esp, 4
dec esi
jne 0x598b50
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
test edi, edi
je 0x598a8f
push edi
mov edx, eax
mov ecx, ebx
call fcn.005b1af0
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x2c]
add esp, 4
mov ecx, esi
push edi
call fcn.005b1b90
add esp, 4
jmp 0x598a93
push dword [esp + 0x24]
mov byte [0x650ce4], 3
mov edx, 0x105
mov ecx, 0x65123c
call fcn.005c1c20
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa30]
xor ecx, esp
call fcn.00541b41
mov esp, ebp
pop ebp
ret
cmp al, 1
jne 0x598c23
cmp byte [esp + 0x13], 0
push dword [esp + 0x24]
mov edx, 0x105
je 0x598b0f
mov ecx, 0x65123c
mov byte [0x650ce4], 6
call fcn.005c1c20
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa30]
xor ecx, esp
call fcn.00541b41
mov esp, ebp
pop ebp
ret
cmp al, 3
je 0x598c2f
cmp al, 6
jne 0x598d12
cmp byte [esp + 0x13], 0
push dword [esp + 0x24]
mov byte [0x650ce4], 3
mov edx, 0x105
jne 0x598bbc
mov ecx, 0x651032
call fcn.005c1c20
mov byte [0x650ce4], 1
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa30]
xor ecx, esp
call fcn.00541b41
mov esp, ebp
pop ebp
ret
cmp byte [esp + 0x13], 0
je 0x598cbe
push dword [esp + 0x24]
mov edx, 0x105
mov ecx, 0x65123c
mov byte [0x650ce4], 6
mov byte [0x65145e], 1
call fcn.005c1c20
mov byte [0x650ce2], 1
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa30]
xor ecx, esp
call fcn.00541b41
mov esp, ebp
pop ebp
ret
mov al, byte [0x650ce4]
cmp al, 2
je 0x598ccb
cmp al, 3
jne 0x598cee
push 0x180
push 0x651032
call fcn.005444f8
add esp, 8
test eax, eax
jne 0x598cee
push 0x651032
call fcn.005445a9
add esp, 4
push dword [esp + 0x24]
mov edx, 0x105
mov ecx, 0x651032
mov byte [0x650ce4], 1
call fcn.005c1c20
mov byte [0x650ce2], 0
add esp, 4
mov ecx, dword [esp + 0xa3c]
pop edi
pop esi
pop ebx
xor ecx, esp
mov al, 1
call fcn.00541b41
mov esp, ebp
pop ebp
ret