Function at 0x409294
Capabilities:
Packed with generic packer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [ebp + 8]
xor ecx, ecx
mov cx, word [eax + 0xa]
and ecx, 0x7fff
sub ecx, 0x3fff
mov dword [ebp - 4], ecx
mov edx, dword [ebp + 8]
xor eax, eax
mov ax, word [edx + 0xa]
and eax, 0x8000
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 6]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 2]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp + 8]
xor eax, eax
mov ax, word [edx]
shl eax, 0x10
mov dword [ebp - 0x10], eax
cmp dword [ebp - 4], 0xffffc001
jne 0x409300
mov dword [ebp - 8], 0
lea ecx, [ebp - 0x18]
push ecx
call fcn.00409140
add esp, 4
test eax, eax
je 0x4092e8
mov dword [ebp - 0x1c], 0
jmp 0x4092fb
lea edx, [ebp - 0x18]
push edx
call fcn.00409110
add esp, 4
mov dword [ebp - 0x1c], 2
jmp 0x58d69f
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x30]
push ecx
call fcn.004090c0
add esp, 8
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 8]
push eax
lea ecx, [ebp - 0x18]
push ecx
call fcn.00408fe0
add esp, 8
test eax, eax
je 0x409330
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x10]
mov edx, dword [eax + 4]
sub edx, dword [ecx + 8]
cmp dword [ebp - 4], edx
jge 0x409360
lea eax, [ebp - 0x18]
push eax
call fcn.00409110
add esp, 4
mov dword [ebp - 8], 0
mov dword [ebp - 0x1c], 2
jmp 0x40944c
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 4]
cmp edx, dword [ecx + 4]
jg 0x4093d0
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 4]
sub ecx, dword [ebp - 4]
mov dword [ebp - 0x34], ecx
lea edx, [ebp - 0x30]
push edx
lea eax, [ebp - 0x18]
push eax
call fcn.004090c0
add esp, 8
mov ecx, dword [ebp - 0x34]
push ecx
lea edx, [ebp - 0x18]
push edx
call fcn.00409180
add esp, 8
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 8]
push ecx
lea edx, [ebp - 0x18]
push edx
call fcn.00408fe0
add esp, 8
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0xc]
add ecx, 1
push ecx
lea edx, [ebp - 0x18]
push edx
jmp 0x5943e1
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 4]
cmp ecx, dword [eax]
jl 0x40941b
lea edx, [ebp - 0x18]
push edx
call fcn.00409110
add esp, 4
mov eax, dword [ebp - 0x18]
or eax, 0x80000000
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + 0xc]
push edx
lea eax, [ebp - 0x18]
push eax
call fcn.00409180
add esp, 8
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov eax, dword [ebp + 0x10]
add edx, dword [eax + 0x14]
mov dword [ebp - 8], edx
mov dword [ebp - 0x1c], 1
jmp 0x40944c
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 4]
add edx, dword [ecx + 0x14]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0x18]
and eax, 0x7fffffff
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + 0xc]
push edx
lea eax, [ebp - 0x18]
push eax
call fcn.00409180
add esp, 8
mov dword [ebp - 0x1c], 0
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + 0xc]
add edx, 1
mov eax, 0x20
sub eax, edx
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
shl edx, cl
mov eax, dword [ebp - 0x18]
or eax, edx
mov ecx, dword [ebp - 0x20]
neg ecx
sbb ecx, ecx
and ecx, 0x80000000
or eax, ecx
mov dword [ebp - 0x24], eax
mov edx, dword [ebp + 0x10]
cmp dword [edx + 0x10], 0x40
jne 0x40949a
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x24]
mov dword [eax + 4], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x14]
mov dword [edx], eax
jmp 0x4094ab
mov ecx, dword [ebp + 0x10]
cmp dword [ecx + 0x10], 0x20
jne 0x4094ab
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x24]
mov dword [edx], eax
mov eax, dword [ebp - 0x1c]
mov esp, ebp
pop ebp
ret