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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x55de60
mov eax, dword fs:[0]
push eax
sub esp, 0x90
push ebx
push esi
push edi
mov eax, dword [0x5b38f0]
xor eax, esp
push eax
lea eax, [esp + 0xa0]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x14], ebx
cmp dword [ebp + 0x10], 1
jne 0x413a71
cmp dword [ebp + 0x1c], 4
jne 0x413a71
call fcn.00413389
test al, al
jne 0x4134f5
mov eax, 0x8007000e
jmp 0x413a76
mov eax, dword [ebp + 0xc]
xor edx, edx
mov byte [esp + 0x13], dl
xorps xmm0, xmm0
movlpd qword [esp + 0x7c], xmm0
test eax, eax
je 0x413533
mov eax, dword [eax]
test eax, eax
je 0x413533
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x50], ecx
mov dword [esp + 0x3c], eax
cmp eax, edx
ja 0x413546
jb 0x41352c
cmp ecx, 0x1000000
ja 0x413546
mov byte [esp + 0x13], 1
jmp 0x413546
mov eax, dword [esp + 0x80]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x50], eax
mov dword [esp + 0x7c], ebx
mov esi, dword [ebp + 0x14]
lea ecx, [ebx + 0x24]
mov eax, dword [ebp + 8]
mov dword [esp + 0xa8], edx
push dword [esi]
mov eax, dword [eax]
mov dword [esp + 0x78], eax
call fcn.00412e4c
lea ecx, [ebx + 0x10]
call fcn.00412d42
push dword [esi + 4]
lea ecx, [ebx + 0x4c]
call fcn.00412e4c
lea eax, [ebx + 0x38]
mov ecx, eax
mov dword [esp + 0x78], eax
call fcn.00412d42
push dword [esi + 8]
lea ecx, [ebx + 0x74]
call fcn.00412e4c
lea eax, [ebx + 0x60]
mov ecx, eax
mov dword [esp + 0x90], eax
call fcn.00412d42
push dword [esi + 0xc]
lea ecx, [ebx + 0xb4]
call fcn.00412e4c
lea ecx, [ebx + 0x88]
call fcn.00412f9d
mov eax, 0x400
lea edi, [ebx + 0xc8]
mov ecx, 0x102
rep stosd dword es:[edi], eax
xor eax, eax
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x74]
lea edx, [esp + 0x1c]
push edx
mov byte [esp + 0xac], 1
push 0x582340
mov eax, dword [ecx]
push ecx
call dword [eax]
xorps xmm0, xmm0
xor edx, edx
movlpd qword [esp + 0x54], xmm0
mov esi, edx
mov eax, dword [esp + 0x58]
mov ebx, edx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x54]
movlpd qword [esp + 0x2c], xmm0
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x2c]
movlpd qword [esp + 0x64], xmm0
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0x20], esi
movlpd qword [esp + 0x44], xmm0
mov byte [esp + 0x11], dl
mov dword [esp + 0x28], eax
mov dword [esp + 0x18], ecx
mov eax, 0x20000
mov edi, edx
sub eax, ebx
je 0x413695
mov edx, dword [esp + 0x74]
lea esi, [esp + 0x60]
push esi
push eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [edx]
mov eax, dword [eax + 8]
add eax, edi
add eax, ebx
push eax
push edx
call dword [ecx + 0xc]
mov esi, eax
test esi, esi
jne 0x4139c5
cmp dword [esp + 0x60], eax
je 0x41368f
add edi, dword [esp + 0x60]
mov eax, 0x20000
sub eax, edi
sub eax, ebx
jne 0x413654
mov esi, dword [esp + 0x20]
xor edx, edx
lea eax, [edi + ebx]
mov dword [esp + 0x64], eax
cmp eax, 5
jb 0x4139cb
mov ebx, dword [esp + 0x14]
add eax, 0xfffffffb
mov edi, edx
mov dword [esp + 0x54], eax
mov eax, dword [ebx + 8]
lea ecx, [ebx + 0x10]
mov al, byte [edi + eax]
mov byte [esp + 0x24], al
push dword [esp + 0x24]
call fcn.00412f5d
mov dl, byte [esp + 0x24]
mov cl, byte [esp + 0x11]
call fcn.00413346
test al, al
je 0x413958
mov ecx, dword [ebx + 8]
mov al, byte [ecx + edi + 4]
movzx edx, byte [ecx + edi + 3]
mov byte [esp + 0x12], al
movzx eax, al
shl eax, 8
or edx, eax
movzx eax, byte [ecx + edi + 2]
shl edx, 8
or edx, eax
movzx eax, byte [ecx + edi + 1]
shl edx, 8
lea ecx, [edi + 5]
or edx, eax
mov eax, dword [esp + 0x1c]
add ecx, edx
mov dword [esp + 0x84], edx
add ecx, esi
mov dword [esp + 0x5c], ecx
test eax, eax
je 0x41390a
xor ecx, ecx
mov esi, edi
add esi, dword [esp + 0x44]
mov dword [esp + 0x70], esi
adc ecx, dword [esp + 0x48]
mov dword [esp + 0x34], ecx
cmp dword [esp + 0x28], ecx
ja 0x41380b
jb 0x413753
mov ecx, dword [esp + 0x18]
cmp ecx, esi
jae 0x41380f
mov ecx, dword [eax]
lea edx, [esp + 0x94]
push edx
push dword [esp + 0x44]
push dword [esp + 0x54]
push eax
call dword [ecx + 0xc]
mov esi, eax
test esi, esi
jne 0x41379c
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x2c], ecx
add ecx, dword [esp + 0x94]
mov dword [esp + 0x38], edx
adc edx, dword [esp + 0x98]
add dword [esp + 0x4c], 1
adc dword [esp + 0x40], eax
mov eax, dword [esp + 0x1c]
jmp 0x4137e2
cmp esi, 1
je 0x4137ad
cmp esi, 0x80004001
jne 0x413a47
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4137c3
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
xor ecx, ecx
mov eax, ecx
mov dword [esp + 0x1c], eax
xorps xmm0, xmm0
or ecx, 0xffffffff
movlpd qword [esp + 0x2c], xmm0
or edx, 0xffffffff
mov esi, dword [esp + 0x30]
mov dword [esp + 0x38], esi
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x2c], esi
mov dword [esp + 0x28], edx
mov dword [esp + 0x18], ecx
cmp edx, dword [esp + 0x34]
jb 0x413753
mov esi, dword [esp + 0x70]
ja 0x413802
cmp ecx, esi
jb 0x413753
mov edx, dword [esp + 0x84]
jmp 0x41380f
mov ecx, dword [esp + 0x18]
test eax, eax
jne 0x4138b3
cmp byte [esp + 0x13], al
je 0x41392b
xor ecx, ecx
cmp ecx, dword [esp + 0x3c]
ja 0x413837
jb 0x413835
mov eax, dword [esp + 0x5c]
cmp eax, dword [esp + 0x50]
jae 0x413837
mov cl, 1
mov ch, byte [esp + 0x24]
xor edx, edx
movzx eax, byte [esp + 0x11]
cmp ch, 0xe9
setne dl
add edx, 0x100
cmp ch, 0xe8
cmove edx, eax
test cl, cl
lea ecx, [edx + 0x32]
lea ecx, [ebx + ecx*4]
je 0x413949
push 1
lea eax, [ebx + 0x88]
push eax
call fcn.00413f8d
mov ebx, dword [esp + 0x90]
add edi, 5
cmp byte [esp + 0x24], 0xe8
push 0x18
cmove ebx, dword [esp + 0x7c]
mov dword [esp + 0x38], edi
mov edi, dword [esp + 0x60]
pop esi
mov ecx, esi
mov eax, edi
shr eax, cl
mov ecx, ebx
push eax
call fcn.00412f5d
sub esi, 8
jns 0x41388f
mov al, byte [esp + 0x12]
mov edi, dword [esp + 0x34]
mov ebx, dword [esp + 0x14]
jmp 0x41395d
mov eax, ecx
mov ecx, dword [esp + 0x28]
sub eax, dword [esp + 0x2c]
sbb ecx, dword [esp + 0x38]
mov dword [esp + 0x88], ecx
jne 0x41392b
cmp eax, 0x1000000
ja 0x41392b
mov eax, edx
cdq
add eax, esi
push 0
adc edx, dword [esp + 0x38]
add eax, 5
pop ecx
adc edx, ecx
cmp edx, dword [esp + 0x38]
jb 0x413940
ja 0x4138f0
cmp eax, dword [esp + 0x2c]
jb 0x413940
cmp edx, dword [esp + 0x28]
ja 0x413940
jb 0x413835
mov ecx, dword [esp + 0x18]
cmp eax, ecx
jb 0x413835
jmp 0x413940
cmp byte [esp + 0x13], 0
je 0x41392b
xor eax, eax
cmp eax, dword [esp + 0x3c]
ja 0x413942
jb 0x413835
cmp ecx, dword [esp + 0x50]
jb 0x413835
jmp 0x413942
mov ch, byte [esp + 0x12]
test ch, ch
je 0x413835
cmp ch, 0xff
je 0x413835
xor eax, eax
mov cl, al
jmp 0x413837
xor eax, eax
push eax
lea eax, [ebx + 0x88]
push eax
call fcn.00413f8d
mov al, byte [esp + 0x24]
inc edi
mov esi, dword [esp + 0x20]
mov byte [esp + 0x11], al
cmp edi, dword [esp + 0x54]
jbe 0x4136b2
mov ecx, dword [ebp + 0x20]
add esi, edi
add dword [esp + 0x44], edi
push 0
pop edx
adc dword [esp + 0x48], edx
mov dword [esp + 0x20], esi
test ecx, ecx
je 0x4139a3
mov eax, dword [ecx]
push edx
lea edx, [esp + 0x48]
push edx
push ecx
call dword [eax + 0xc]
mov esi, eax
test esi, esi
jne 0x413a47
mov esi, dword [esp + 0x20]
xor edx, edx
mov ebx, edx
mov edx, dword [esp + 0x64]
jmp 0x4139ba
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 8]
mov al, byte [ecx + edi]
mov byte [ecx + ebx], al
inc ebx
inc edi
cmp edi, edx
jb 0x4139ab
xor edx, edx
jmp 0x413649
mov ebx, dword [esp + 0x14]
jmp 0x413a47
mov esi, edx
test eax, eax
je 0x413a3a
mov edi, dword [esp + 0x14]
mov eax, dword [edi + 8]
lea ecx, [edi + 0x10]
mov bl, byte [esi + eax]
mov byte [esp + 0x54], bl
push dword [esp + 0x54]
call fcn.00412f5d
cmp bl, 0xe8
jne 0x4139f7
movzx eax, byte [esp + 0x11]
jmp 0x413a17
cmp bl, 0xe9
jne 0x413a03
mov eax, 0x100
jmp 0x413a17
cmp byte [esp + 0x11], 0xf
jne 0x413a2f
mov al, bl
and al, 0xf0
cmp al, 0x80
jne 0x413a2f
mov eax, 0x101
xor ecx, ecx
push ecx
lea ecx, [edi + 0x88]
push ecx
lea ecx, [edi + 0xc8]
lea ecx, [ecx + eax*4]
call fcn.00413f8d
inc esi
mov byte [esp + 0x11], bl
cmp esi, dword [esp + 0x64]
jb 0x4139d5
mov ebx, dword [esp + 0x14]
mov ecx, ebx
call fcn.0041344c
mov esi, eax
xor eax, eax
mov byte [esp + 0xa8], al
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x413a5e
mov edx, dword [ecx]
push ecx
call dword [edx + 8]
or dword [esp + 0xa8], 0xffffffff
mov ecx, ebx
call fcn.004130b8
mov eax, esi
jmp 0x413a76
mov eax, 0x80070057
mov ecx, dword [esp + 0xa0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c