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

Disassembly:
sub esp, 0xc0
mov eax, dword [0x6651c0]
xor eax, esp
mov dword [esp + 0xbc], eax
mov eax, dword [esp + 0xc8]
push ebx
mov ebx, dword [esp + 0xd0]
push ebp
push esi
mov esi, dword [esp + 0xd0]
mov dword [esp + 0x28], eax
push edi
mov dword [esp + 0x28], esi
mov eax, dword [esi]
mov edi, dword [esi + 8]
mov dword [esp + 0x64], ebx
mov eax, dword [eax]
mov dword [esp + 0x3c], eax
mov ecx, dword [eax]
mov dword [esp + 0x10], ecx
xor ecx, ecx
mov ebp, ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x34], ebp
mov dword [esp + 0x24], ecx
cmp dword [eax + 0x24], ecx
je 0x5947fc
mov eax, dword [eax + 0xc]
jmp 0x594f21
mov eax, dword [edi + 0x2c]
test al, 0x20
push 0x18
mov dword [esp + 0x50], eax
mov eax, 0x1bf
pop edx
cmove edx, eax
test dword [ebx + 0x38], 0x104
je 0x594837
mov ecx, edx
mov eax, 0x100
and ecx, 0xffffffc3
test byte [ebx + 0x38], 4
cmove ecx, edx
mov edx, ecx
test dword [ebx + 0x38], eax
je 0x594837
and edx, 0xffffff7c
movzx ecx, word [edi + 0x1a]
movzx eax, word [edi + 0x18]
mov dword [esp + 0x5c], ecx
movzx ecx, word [edi + 0x1c]
mov dword [esp + 0x60], ecx
movzx ecx, word [edi + 0x32]
mov dword [esp + 0x48], ecx
movzx ecx, word [edi + 0x30]
mov dword [esp + 0x40], ecx
mov ecx, dword [edi]
mov dword [esp + 0x54], ecx
mov ecx, dword [edi + 4]
mov dword [esp + 0x58], ecx
movzx ecx, word [edi + 0x16]
push ebx
push edx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x34]
movzx eax, ax
push eax
mov dword [esp + 0x24], eax
lea eax, [esp + 0x78]
push dword [ecx + 0x2c]
push dword [esi + 4]
push eax
call fcn.00597789
mov dword [esp + 0x38], eax
xor eax, eax
mov word [edi + 0x12], ax
mov ecx, dword [ebx + 8]
movzx eax, word [ecx]
push eax
mov dword [esp + 0x84], eax
call fcn.0053e8e5
mov edx, dword [esp + 0x3c]
add esp, 0x1c
movzx eax, ax
mov dword [esp + 0x50], eax
test edx, edx
je 0x594df1
movzx ebp, word [edx + 0xc]
lea esi, [edx + 0xa]
xor ecx, ecx
mov eax, ebp
mov dword [esp + 0x14], ecx
mov ecx, 0x100
mov dword [esp + 0x30], eax
cmp ax, cx
je 0x5948e7
test byte [esi], 0x80
je 0x5948ff
push dword [esp + 0x18]
push ebx
call fcn.00545254
pop ecx
pop ecx
test eax, eax
jne 0x594dca
mov edx, dword [esp + 0x20]
mov ecx, dword [edx + 0x20]
mov eax, dword [edx + 0x24]
and ecx, dword [edi + 8]
and eax, dword [edi + 0xc]
or ecx, eax
jne 0x594dca
mov eax, 0x100
test word [esi], ax
je 0x594929
push 0x10
pop eax
cmp bp, ax
je 0x594dca
mov eax, dword [esp + 0x2c]
test byte [eax + 0x24], 0x58
je 0x594944
push eax
push edx
call fcn.0053c36b
pop ecx
pop ecx
test eax, eax
je 0x594dca
cmp byte [ebx + 0x36], 0
je 0x59495f
movzx eax, word [ebx + 0x32]
dec eax
cmp dword [esp + 0x18], eax
jne 0x59495f
mov eax, dword [esp + 0x28]
or byte [eax + 0x10], 2
jmp 0x594967
mov eax, dword [esp + 0x28]
or byte [eax + 0x10], 1
mov eax, dword [esp + 0x4c]
mov dword [edi + 0x2c], eax
mov eax, dword [esp + 0x44]
mov word [edi + 0x18], ax
mov eax, dword [esp + 0x5c]
mov word [edi + 0x1a], ax
mov eax, dword [esp + 0x60]
mov word [edi + 0x1c], ax
mov eax, dword [esp + 0x40]
mov word [edi + 0x30], ax
cmp ax, word [edi + 0x34]
jb 0x5949af
mov esi, dword [esp + 0x10]
movzx eax, ax
inc eax
push eax
push edi
push esi
call fcn.0059606c
add esp, 0xc
test eax, eax
jne 0x594f3a
movzx ecx, word [edi + 0x30]
mov eax, dword [edi + 0x38]
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 0x54]
mov dword [eax + ecx*4], edx
mov ax, word [edi + 0x30]
mov ecx, dword [edi + 8]
inc ax
mov word [edi + 0x30], ax
not ecx
or esi, dword [edx + 0x20]
mov edx, dword [edx + 0x24]
and esi, ecx
or edx, dword [esp + 0x58]
movzx ebp, ax
mov eax, dword [edi + 0xc]
not eax
mov dword [edi], esi
and edx, eax
mov eax, dword [esp + 0x30]
mov dword [edi + 4], edx
test al, 1
je 0x594aec
mov eax, dword [esp + 0x20]
mov edx, dword [eax]
test dword [edx + 4], 0x1000
je 0x594abf
xor eax, eax
mov dword [esp + 0x14], 0x2e
lea esi, [ebp - 1]
mov ecx, eax
test esi, esi
jle 0x594ae4
mov ebp, dword [edi + 0x38]
mov ebx, dword [esp + 0x14]
mov eax, dword [ebp + ecx*4]
test eax, eax
je 0x594a3c
and dword [esp + 0x14], 0
cmp dword [eax], edx
cmove ebx, dword [esp + 0x14]
inc ecx
cmp ecx, esi
jl 0x594a28
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x64]
mov eax, dword [esp + 0x14]
test byte [ebx + 0x38], 0x80
je 0x594aae
mov ebp, dword [esp + 0x50]
push 0xa
pop ecx
cmp bp, cx
jl 0x594aae
movzx esi, ax
push esi
call fcn.0053e8e5
mov edx, dword [esp + 0x1c]
pop ecx
mov ecx, dword [ebx + 8]
push 0xa
mov cx, word [ecx + edx*2]
sub cx, si
sub cx, bp
add ax, cx
pop ecx
add ax, cx
jns 0x594aae
mov esi, dword [esp + 0x10]
push 2
pop eax
cmp word [esp + 0xe0], ax
jge 0x594dce
test dword [esi + 0x50], 0x20000
jne 0x594dce
or dword [edi + 0x2c], 0x100000
or dword [edi + 0x2c], 4
mov esi, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
jmp 0x594c20
mov eax, dword [edx + 0x14]
test eax, eax
je 0x594a49
mov eax, dword [eax]
test eax, eax
je 0x594a49
cdq
push edx
push eax
call fcn.0056ca22
pop ecx
cwde
pop ecx
mov dword [esp + 0x14], eax
jmp 0x594a4d
push 0x2e
pop eax
jmp 0x594a4d
test al, 0x82
je 0x594b84
mov eax, dword [ebx + 4]
xor edx, edx
mov ecx, dword [esp + 0x18]
inc edx
movsx eax, word [eax + ecx*2]
mov ecx, dword [edi + 0x2c]
or ecx, edx
mov dword [edi + 0x2c], ecx
cmp eax, 0xffffffff
je 0x594b55
mov esi, ecx
mov edx, ecx
test eax, eax
js 0x594b62
cmp word [esp + 0xe0], 0
jne 0x594b62
movzx eax, word [ebx + 0x32]
mov ebp, eax
dec eax
cmp dword [esp + 0x18], eax
jne 0x594b62
test byte [ebx + 0x38], 8
jne 0x594b55
xor eax, eax
inc eax
cmp bp, ax
jne 0x594b4d
cmp byte [ebx + 0x36], 0
je 0x594b4d
push 2
pop eax
cmp word [esp + 0x30], ax
je 0x594b55
or edx, 0x10000
jmp 0x594b5d
mov edx, ecx
or edx, 0x1000
mov esi, edx
mov dword [edi + 0x2c], edx
cmp byte [esp + 0x85], 1
jbe 0x594b77
mov edx, esi
or edx, 0x200000
mov dword [edi + 0x2c], edx
mov esi, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
jmp 0x594c23
bt eax, 8
mov esi, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
jae 0x594ba0
mov edx, dword [edi + 0x2c]
or edx, 8
mov dword [edi + 0x2c], edx
jmp 0x594c23
mov eax, dword [esp + 0x2c]
push esi
push ebp
push ebx
push dword [eax + 0x2c]
push dword [esp + 0x4c]
call fcn.005975d8
mov edx, dword [edi + 0x2c]
add esp, 0x14
test byte [esp + 0x30], 0x24
je 0x594c2d
mov word [edi + 0x1a], ax
or edx, 0x22
xor eax, eax
mov dword [edi + 0x2c], edx
mov dword [esp + 0x1c], eax
mov eax, 0x100
mov dword [esp + 0x24], esi
test word [esi + 0xa], ax
je 0x594c23
lea eax, [esi + 0x30]
mov dword [esp + 0x1c], eax
movzx eax, word [edi + 0x30]
inc eax
push eax
push edi
push dword [esp + 0x18]
call fcn.0059606c
add esp, 0xc
test eax, eax
jne 0x594ded
movzx ecx, word [edi + 0x30]
mov eax, dword [edi + 0x38]
mov edx, dword [esp + 0x1c]
push 0x10
mov dword [eax + ecx*4], edx
inc word [edi + 0x30]
pop eax
or dword [edi + 0x2c], eax
xor eax, eax
inc eax
mov word [edi + 0x1c], ax
mov edx, dword [edi + 0x2c]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
jmp 0x594c57
or edx, 0x12
mov word [edi + 0x1c], ax
mov dword [edi + 0x2c], edx
mov eax, esi
mov dword [esp + 0x1c], eax
test dl, 0x20
je 0x594c51
mov eax, dword [edi + 0x38]
movzx ecx, word [edi + 0x30]
mov ecx, dword [eax + ecx*4 - 8]
mov eax, esi
jmp 0x594c53
xor ecx, ecx
mov dword [esp + 0x24], ecx
test dl, 2
je 0x594c72
mov ebp, dword [esp + 0x28]
push edi
push eax
push ecx
push ebp
push dword [esp + 0x4c]
call fcn.0059755e
add esp, 0x14
jmp 0x594cc5
inc word [edi + 0x18]
movzx ecx, word [esi + 8]
movzx edx, word [edi + 0x18]
test cx, cx
jg 0x594c98
mov eax, dword [ebx + 4]
xor esi, esi
cmp word [eax + ebp*2], si
jl 0x594c98
sub ecx, dword [esp + 0x14]
add word [edi + 0x16], cx
jmp 0x594cc1
mov eax, dword [ebx + 8]
mov cx, word [eax + edx*2]
sub cx, word [eax + edx*2 - 2]
add cx, word [edi + 0x16]
movzx eax, cx
mov word [edi + 0x16], cx
mov ecx, 0x100
test dword [esp + 0x30], ecx
je 0x594cc1
add eax, 0xa
mov word [edi + 0x16], ax
mov ebp, dword [esp + 0x28]
mov eax, dword [ebx + 0x38]
push 3
pop ecx
and eax, ecx
cmp al, cl
jne 0x594cdc
movzx ecx, word [edi + 0x16]
mov esi, ecx
lea eax, [ecx + 0x10]
jmp 0x594cf8
mov ecx, dword [esp + 0x2c]
movsx eax, word [ebx + 0x30]
imul eax, eax, 0xf
movzx esi, word [edi + 0x16]
mov ecx, dword [ecx + 0x10]
cdq
movsx ecx, word [ecx + 0x28]
idiv ecx
inc eax
add eax, esi
movzx eax, ax
push eax
push dword [esp + 0x54]
call fcn.0056caa5
test dword [edi + 0x2c], 0x4000140
pop ecx
pop ecx
movzx edx, ax
jne 0x594d22
lea ecx, [esi + 0x10]
push ecx
push eax
call fcn.0056caa5
pop ecx
pop ecx
movzx edx, ax
mov eax, dword [esp + 0x14]
push dword [esp + 0x68]
movzx ecx, ax
push edi
lea eax, [edx + ecx]
add eax, dword [esp + 0xe8]
mov word [edi + 0x14], ax
lea eax, [esi + ecx]
add eax, dword [esp + 0xe8]
mov word [edi + 0x16], ax
push dword [ebp + 4]
call fcn.00595ee7
push edi
push ebp
call fcn.00595d9b
mov edx, dword [edi + 0x2c]
add esp, 0x14
mov dword [esp + 0x34], eax
test dl, 2
je 0x594d71
mov esi, dword [esp + 0x38]
movzx ecx, si
jmp 0x594d78
movzx ecx, si
mov esi, dword [esp + 0x38]
mov word [edi + 0x16], cx
test dl, 0x10
jne 0x594dc6
movzx ecx, word [edi + 0x18]
cmp cx, word [ebx + 0x34]
jae 0x594dc6
cmp cx, word [ebx + 0x32]
jb 0x594d9a
mov eax, dword [ebx + 0x38]
and al, 3
cmp al, 2
je 0x594dc6
push 3
pop eax
cmp cx, ax
jbe 0x594dac
push dword [esp + 0x3c]
call fcn.005732e0
pop ecx
mov eax, dword [esp + 0x14]
add eax, dword [esp + 0xe0]
push eax
push ebx
push dword [esp + 0x34]
push ebp
call fcn.00594795
add esp, 0x10
mov word [edi + 0x16], si
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x6c]
push eax
call fcn.0059785b
mov ebp, dword [esp + 0x38]
mov edx, eax
mov dword [esp + 0x24], edx
pop ecx
test ebp, ebp
je 0x5948bd
jmp 0x594df5
mov ebp, dword [esp + 0x34]
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
mov dword [edi], eax
mov eax, dword [esp + 0x58]
mov dword [edi + 4], eax
mov eax, dword [esp + 0x5c]
mov word [edi + 0x1a], ax
mov eax, dword [esp + 0x60]
mov word [edi + 0x1c], ax
mov eax, dword [esp + 0x48]
mov word [edi + 0x32], ax
mov eax, dword [esp + 0x4c]
mov dword [edi + 0x2c], eax
mov eax, dword [esp + 0x38]
mov word [edi + 0x18], dx
mov word [edi + 0x16], ax
mov word [edi + 0x30], cx
cmp dx, word [esp + 0x48]
jne 0x594f1f
movzx ecx, word [ebx + 0x32]
movzx eax, dx
inc eax
cmp eax, ecx
jae 0x594f1f
mov ecx, dword [esp + 0x40]
cmp dx, cx
jne 0x594f1f
test byte [ebx + 0x38], 0x40
jne 0x594f1f
test byte [ebx + 0x38], 0x80
je 0x594f1f
test dword [esi + 0x50], 0x4000
jne 0x594f1f
mov eax, dword [ebx + 8]
movzx esi, dx
cmp word [eax + esi*2 + 2], 0x2a
jl 0x594f1f
movzx eax, cx
inc eax
push eax
push edi
push dword [esp + 0x18]
call fcn.0059606c
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x594f1f
movzx ecx, word [edi + 0x30]
inc eax
add word [edi + 0x18], ax
xor edx, edx
add word [edi + 0x32], ax
mov eax, dword [edi + 0x38]
mov dword [eax + ecx*4], edx
xor eax, eax
or dword [edi + 0x2c], 0x8000
inc eax
add word [edi + 0x30], ax
mov ecx, dword [ebx + 8]
mov ax, word [ecx + esi*2]
sub ax, word [ecx + esi*2 + 2]
mov ecx, dword [esp + 0xe0]
movzx eax, ax
add ecx, 5
sub word [edi + 0x16], ax
add eax, ecx
push eax
push ebx
push dword [esp + 0x34]
push dword [esp + 0x34]
call fcn.00594795
mov eax, dword [esp + 0x48]
add esp, 0x10
mov word [edi + 0x16], ax
mov eax, dword [esp + 0x44]
mov word [edi + 0x18], ax
mov eax, dword [esp + 0x48]
mov word [edi + 0x32], ax
mov eax, dword [esp + 0x4c]
mov dword [edi + 0x2c], eax
mov eax, ebp
mov ecx, dword [esp + 0xcc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0059d866
add esp, 0xc0
ret
mov ebp, dword [esp + 0x34]
jmp 0x594df5