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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x674
mov eax, dword [0x64e0a0]
xor eax, esp
mov dword [esp + 0x670], eax
push ebx
push esi
lea eax, [esp + 0x150]
mov dword [esp + 0x144], eax
push edi
lea eax, [esp + 0x148]
push eax
movzx eax, byte [0x65c1e4]
push eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x154], 0x104
mov dword [esp + 0x158], 0
call fcn.005b0e80
add esp, 8
sub eax, 0
je 0x598ed3
dec eax
je 0x598e3e
mov eax, dword [esp + 0x148]
lea ecx, [esp + 0x154]
cmp eax, ecx
je 0x598fad
test eax, eax
je 0x598fad
push eax
call fcn.00541b50
add esp, 4
mov eax, 0xa
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x670]
xor ecx, esp
call fcn.00541b41
mov esp, ebp
pop ebp
ret
mov edi, dword [esp + 0x148]
xor esi, esi
push esi
push 0x80
push 4
push esi
push 1
push closesocket
push edi
mov dword [esp + 0x98], esi
call dword [0x649010]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x598f8a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x598e80
cmp eax, 2
jne 0x598ec5
test esi, esi
jle 0x598ec5
mov eax, esi
cmp esi, 0xc8
jl 0x598e93
mov eax, 0xc8
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0x80
push 4
push 0
push 1
push closesocket
push edi
sub esi, 0xc8
call dword [0x649010]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x598e70
jmp 0x598f8a
lea eax, [ebx + 1]
neg eax
sbb eax, eax
and ebx, eax
jmp 0x598f8a
push dword [esp + 0x148]
lea eax, [esp + 0x6c]
xor ebx, ebx
push eax
xor esi, esi
mov dword [esp + 0x78], ebx
call fcn.0041e890
lea eax, [esp + 0x68]
mov dword [esp + 0x50], 0x18
mov dword [esp + 0x54], ebx
mov dword [esp + 0x5c], 0x40
mov dword [esp + 0x58], eax
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
push 0
push 0
push 0x20
push 3
push 1
push 0x80
push 0
lea eax, [esp + 0xa4]
push eax
lea eax, [esp + 0x70]
push eax
push 0x80100080
lea eax, [esp + 0x54]
push eax
call fcn.0041edd6
mov edi, eax
test edi, edi
jns 0x598f75
cmp edi, 0xc0000043
je 0x598f53
cmp edi, 0xc000000f
jne 0x598f75
test esi, esi
jle 0x598f75
mov eax, esi
cmp esi, 0xc8
jl 0x598f66
mov eax, 0xc8
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esi, 0xc8
jmp 0x598f10
push edi
call fcn.0041e908
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
test edi, edi
js 0x598f8a
mov ebx, dword [esp + 0x2c]
mov eax, dword [esp + 0x148]
lea ecx, [esp + 0x154]
cmp eax, ecx
je 0x598fa9
test eax, eax
je 0x598fa9
push eax
call fcn.00541b50
add esp, 4
test ebx, ebx
jne 0x598fc7
mov eax, 0xa
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x670]
xor ecx, esp
call fcn.00541b41
mov esp, ebp
pop ebp
ret
mov esi, dword [esp + 0x14]
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x598fd0
sub ecx, edx
sar ecx, 1
cmp ecx, 0x105
jae 0x598ffc
push esi
push 0x105
push 0x65123c
call fcn.00543349
add esp, 0xc
jmp 0x59901c
push 0x104
push esi
push 0x105
push 0x65123c
call fcn.00543d6d
add esp, 0x10
xor eax, eax
mov word [0x651444], ax
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor eax, eax
mov dword [esp + 0x98], 0x4034b50
mov dword [esp + 0x9c], 0x14
mov dword [esp + 0xa0], 8
mov word [esp + 0xa4], ax
mov dword [esp + 0xa6], eax
mov dword [esp + 0xaa], eax
mov dword [esp + 0xae], eax
mov dword [esp + 0xb2], eax
mov dword [esp + 0xb8], 0x6054b50
mov dword [esp + 0xbc], eax
mov dword [esp + 0xc0], 0x10001
mov dword [esp + 0xc4], eax
mov dword [esp + 0xc8], eax
mov word [esp + 0xcc], ax
cmp byte [0x65c1e4], al
je 0x59912e
push 5
push 0x18
lea eax, [esp + 0x108]
push eax
lea eax, [esp + 0x80]
push eax
push ebx
call fcn.0041ec0e
test eax, eax
jns 0x5990d8
push eax
call fcn.0041e908
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x599159
mov ecx, dword [esp + 0x108]
mov eax, dword [esp + 0x10c]
sub ecx, 0x16
sbb eax, 0
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], eax
test eax, eax
jg 0x599108
jl 0x5990fe
test ecx, ecx
jae 0x599108
push 0x19
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x599159
push 0xe
push 8
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x80]
push eax
push ebx
call fcn.0041ed62
push eax
call fcn.0041e908
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x599159
push 2
lea eax, [esp + 0x28]
push eax
push 0xffffffffffffffea
push ebx
mov dword [esp + 0x30], 0xffffffea
mov dword [esp + 0x34], 0xffffffff
call esi
mov dword [esp + 0x20], eax
cmp eax, 0xffffffff
jne 0x599159
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x16
lea edx, [esp + 0xbc]
mov ecx, ebx
call fcn.005b1af0
mov cx, word [esp + 0xc4]
mov eax, dword [esp + 0xc4]
movzx edi, cx
dec eax
add esp, 4
mov dword [esp + 0x28], edi
cmp ax, 1
ja 0x599689
cmp cx, 2
jne 0x5991a3
cmp dword [esp + 0x10], 0
je 0x5991a3
mov edi, 1
mov dword [esp + 0x28], edi
mov eax, dword [esp + 0xc8]
xor ecx, ecx
cmp byte [0x65c1e4], cl
je 0x5991f6
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
test ecx, ecx
jg 0x5991d0
jl 0x5991c6
test eax, eax
jae 0x5991d0
push 0x19
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x599218
push 0xe
push 8
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x9c]
push eax
push ebx
call fcn.0041ed62
push eax
call fcn.0041e908
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x599218
push 0
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x20]
push ecx
push eax
push ebx
mov dword [esp + 0x28], eax
call esi
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x599218
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx eax, di
dec eax
je 0x599260
dec eax
jne 0x599273
push 0x2e
lea edx, [esp + 0xd4]
mov ecx, ebx
call fcn.005b1af0
movzx eax, word [esp + 0xf0]
cdq
add esp, 4
mov ecx, ebx
push edx
push eax
mov edx, 1
call fcn.005b1860
push 0x2e
lea edx, [esp + 0x124]
mov ecx, ebx
call fcn.005b1af0
add esp, 0xc
jmp 0x599273
push 0x2e
lea edx, [esp + 0xd4]
mov ecx, ebx
call fcn.005b1af0
add esp, 4
cmp byte [0x65c1e4], 0
je 0x5992b2
push 0xe
push 8
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x8c]
push eax
push ebx
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
call fcn.0041ed62
push eax
call fcn.0041e908
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x5992dd
push 0
lea eax, [esp + 0x38]
push eax
push 0
push ebx
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0
call esi
mov dword [esp + 0x30], eax
cmp eax, 0xffffffff
jne 0x5992dd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1e
lea edx, [esp + 0x9c]
mov ecx, ebx
call fcn.005b1af0
mov ax, word [esp + 0xb6]
mov ecx, 0x104
add esp, 4
cmp ax, cx
ja 0x599668
cmp ax, word [esp + 0xec]
jne 0x599668
movzx eax, ax
push eax
lea edx, [esp + 0x364]
mov ecx, ebx
call fcn.005b1af0
movzx eax, word [esp + 0xb6]
add esp, 4
cmp eax, 0x105
jae 0x5996c7
push 0x105
mov byte [esp + eax + 0x364], 0
lea eax, [esp + 0x46c]
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x36c]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor eax, eax
mov word [esp + 0x670], ax
mov eax, dword [esp + 0xaa]
add eax, 2
mov dword [esp + 0x10], eax
cmp di, 2
jne 0x599399
mov eax, dword [esp + 0xe8]
mov ecx, dword [esp + 0x130]
cmp eax, ecx
ja 0x5993a0
mov eax, ecx
jmp 0x5993a0
mov eax, dword [esp + 0xae]
push eax
call fcn.005421d4
mov esi, eax
add esp, 4
mov dword [esp + 0x18], esi
test esi, esi
je 0x5993f5
cmp di, 2
jne 0x5993d5
mov ecx, dword [esp + 0x12c]
mov eax, dword [esp + 0xe4]
add ecx, 2
add eax, 2
cmp eax, ecx
ja 0x5993d9
mov eax, ecx
jmp 0x5993d9
mov eax, dword [esp + 0x10]
push eax
call fcn.005421d4
mov edi, eax
add esp, 4
mov dword [esp + 0x14], edi
test edi, edi
jne 0x599416
push esi
call fcn.00541b50
add esp, 4
mov ecx, ebx
call fcn.005b1c00
mov eax, 0xb
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x670]
xor ecx, esp
call fcn.00541b41
mov esp, ebp
pop ebp
ret
lea eax, [edi + 2]
mov word [edi], 0x9c78
push dword [esp + 0xaa]
mov edx, eax
mov ecx, ebx
mov dword [esp + 0x24], eax
call fcn.005b1af0
mov ecx, dword [esp + 0xb2]
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x14]
add eax, 2
add esp, 4
cmp eax, ecx
jne 0x59962d
push ecx
push edi
lea edx, [esp + 0x14]
mov ecx, esi
call fcn.0040d4b0
add esp, 8
test eax, eax
jne 0x5994d4
xor edx, edx
lea ecx, [esp + 0x468]
call fcn.005996d0
mov ecx, 0x651032
call fcn.00595350
test eax, eax
jne 0x599489
mov edi, 0xa
jmp 0x599632
mov ecx, 0x651032
call fcn.00595820
mov dword [esp + 0x10], eax
test eax, eax
je 0x59947f
mov esi, dword [esp + 0xc]
mov edx, dword [esp + 0x18]
push esi
mov ecx, eax
call fcn.005b1b90
mov ecx, dword [esp + 0x14]
mov edi, eax
add esp, 4
mov dword [esp + 0xc], edi
call fcn.005b1c00
mov eax, edi
sub eax, esi
mov esi, dword [esp + 0x18]
neg eax
sbb eax, eax
and eax, 0xa
mov dword [esp + 0xc], eax
mov edi, eax
jmp 0x5994d9
mov edi, 5
cmp word [esp + 0x28], 2
jne 0x599632
push 0x1e
lea edx, [esp + 0x9c]
mov ecx, ebx
call fcn.005b1af0
mov ax, word [esp + 0xb6]
mov ecx, 0x104
add esp, 4
cmp ax, cx
ja 0x59962d
cmp ax, word [esp + 0x134]
jne 0x59962d
movzx eax, ax
push eax
lea edx, [esp + 0x364]
mov ecx, ebx
call fcn.005b1af0
movzx eax, word [esp + 0xb6]
add esp, 4
cmp eax, 0x105
jae 0x5996c7
push 0x105
mov byte [esp + eax + 0x364], 0
lea eax, [esp + 0x46c]
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x36c]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edx, dword [esp + 0x20]
xor eax, eax
mov word [esp + 0x670], ax
mov eax, dword [esp + 0xaa]
push eax
mov ecx, ebx
lea edi, [eax + 2]
call fcn.005b1af0
mov ecx, dword [esp + 0xb2]
add eax, 2
add esp, 4
mov dword [esp + 0xc], ecx
cmp eax, edi
jne 0x59962d
push edi
push dword [esp + 0x18]
lea edx, [esp + 0x14]
mov ecx, esi
call fcn.0040d4b0
add esp, 8
test eax, eax
jne 0x599626
lea edx, [eax + 1]
lea ecx, [esp + 0x468]
call fcn.005996d0
mov ecx, 0x651460
call fcn.00595350
test eax, eax
je 0x59947f
mov ecx, 0x651460
call fcn.00595820
mov dword [esp + 0x20], eax
test eax, eax
je 0x59947f
mov edi, dword [esp + 0xc]
push edi
mov edx, esi
mov ecx, eax
call fcn.005b1b90
mov ecx, dword [esp + 0x24]
add esp, 4
mov esi, eax
call fcn.005b1c00
xor eax, eax
cmp esi, edi
setne al
lea eax, [eax*8 + 2]
mov dword [esp + 0xc], eax
mov edi, eax
jmp 0x599632
mov edi, 5
jmp 0x599632
mov edi, 4
mov ecx, ebx
call fcn.005b1c00
push dword [esp + 0x18]
call fcn.00541b50
add esp, 4
push dword [esp + 0x14]
call fcn.00541b50
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x670]
xor ecx, esp
call fcn.00541b41
mov esp, ebp
pop ebp
ret
mov ecx, ebx
call fcn.005b1c00
mov eax, 4
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x670]
xor ecx, esp
call fcn.00541b41
mov esp, ebp
pop ebp
ret
cmp byte [0x65c1e4], 0
push ebx
je 0x5996a7
call fcn.0041e90e
push eax
call fcn.0041e908
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x5996ad
call dword [0x649008]
mov ecx, dword [esp + 0x67c]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 7
call fcn.00541b41
mov esp, ebp
pop ebp
ret
call fcn.005430e4
int3