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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
push esi
mov byte [ebp - 0x10], 0
mov byte [ebp - 4], 0
mov eax, dword [ebp + 8]
mov dword [eax + 0x150], 0xffffffff
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x14c], 0xffffffff
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x144]
mov ecx, dword [ebp + 8]
xor edx, edx
mov dl, byte [ecx + eax + 0x28]
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov eax, dword [ebp + 8]
movsx eax, word [eax + 0x14]
mov esi, dword [ebp + 8]
mov esi, dword [esi + 0x140]
imul esi, eax
imul esi, esi, 5
mov ecx, dword [ecx + edx*8 + 4]
add ecx, esi
mov dword [ebp - 0xc], ecx
cmp dword [ebp - 0xc], 0
jne 0x40328e
jmp 0x4040b1
mov dword [ebp - 8], 0
jmp 0x4032a9
mov edx, dword [ebp - 8]
add edx, 1
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0xc]
add eax, 5
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 0x14]
cmp dword [ebp - 8], edx
jge 0x4040b1
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x34], 0
mov byte [ebp - 0x14], 0
mov eax, dword [ebp - 0xc]
xor ecx, ecx
mov cl, byte [eax + 4]
sar ecx, 4
mov byte [ebp - 0x28], cl
mov edx, dword [ebp - 0xc]
xor eax, eax
mov al, byte [edx + 4]
and eax, 0xf
mov byte [ebp - 0x20], al
mov ecx, dword [ebp - 8]
imul ecx, ecx, 0xac
add ecx, 0x412780
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0xc]
xor eax, eax
mov al, byte [edx + 3]
cmp eax, 3
je 0x403323
mov ecx, dword [ebp - 0xc]
xor edx, edx
mov dl, byte [ecx + 3]
cmp edx, 5
je 0x403323
mov dword [ebp - 0x58], 0
jmp 0x40332a
mov dword [ebp - 0x58], 1
mov al, byte [ebp - 0x58]
mov byte [ebp - 0x14], al
mov ecx, dword [ebp - 0xc]
xor edx, edx
mov dl, byte [ecx + 1]
test edx, edx
je 0x403355
movsx eax, byte [ebp - 0x14]
test eax, eax
jne 0x403355
mov ecx, dword [ebp - 0xc]
xor edx, edx
mov dl, byte [ecx + 1]
sub edx, 1
mov eax, dword [ebp - 0x2c]
mov byte [eax + 0x66], dl
mov ecx, dword [ebp - 0xc]
xor edx, edx
mov dl, byte [ecx]
test edx, edx
je 0x403386
mov eax, dword [ebp - 0xc]
xor ecx, ecx
mov cl, byte [eax]
cmp ecx, 0xff
je 0x403386
movsx edx, byte [ebp - 0x14]
test edx, edx
jne 0x403386
mov eax, dword [ebp - 0xc]
xor ecx, ecx
mov cl, byte [eax]
sub ecx, 1
mov edx, dword [ebp - 0x2c]
mov byte [edx], cl
mov eax, dword [ebp - 0x2c]
xor ecx, ecx
mov cl, byte [eax + 0x66]
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x20]
cmp ecx, eax
jl 0x4033b2
mov dword [ebp - 0x18], 0x413d20
mov dword [ebp - 0x34], 0x413e80
mov ecx, dword [ebp - 0x34]
mov dword [ecx], 0
jmp 0x403414
mov edx, dword [ebp - 0x2c]
xor eax, eax
mov al, byte [edx + 0x66]
imul eax, eax, 0x154
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
add edx, eax
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x2c]
xor ecx, ecx
mov cl, byte [eax]
mov edx, dword [ebp - 0x18]
xor eax, eax
mov al, byte [edx + ecx + 0x44]
cmp eax, 0x10
jl 0x4033e9
mov dword [ebp - 0x34], 0x413e80
jmp 0x403403
mov ecx, dword [ebp - 0x2c]
xor edx, edx
mov dl, byte [ecx]
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov cl, byte [eax + edx + 0x44]
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + ecx*4 + 4]
mov dword [ebp - 0x34], eax
movsx ecx, byte [ebp - 0x14]
test ecx, ecx
jne 0x403414
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x34]
mov dword [edx + 8], eax
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 0x10]
mov dword [ebp - 0x30], edx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x14]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x2c]
xor edx, edx
mov dl, byte [ecx + 0x6c]
cmp edx, 7
jne 0x40345b
mov eax, dword [ebp - 0xc]
xor ecx, ecx
mov cl, byte [eax + 3]
cmp ecx, 7
je 0x40345b
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x10]
mov ecx, dword [ebp - 0x2c]
add eax, dword [ecx + 0x18]
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x10], eax
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0xc]
mov dl, byte [ecx + 3]
mov byte [eax + 0x6c], dl
mov eax, dword [ebp - 0x2c]
mov dword [eax + 0x18], 0
mov ecx, dword [ebp - 0x2c]
mov byte [ecx + 2], 0
mov edx, dword [ebp - 0xc]
xor eax, eax
mov al, byte [edx]
test eax, eax
je 0x403527
mov ecx, dword [ebp - 0xc]
xor edx, edx
mov dl, byte [ecx]
cmp edx, 0xff
je 0x403527
mov eax, dword [ebp - 0xc]
xor ecx, ecx
mov cl, byte [eax]
mov edx, dword [ebp - 0x34]
movsx eax, byte [edx + 0x1f]
lea ecx, [ecx + eax - 1]
mov edx, dword [ebp - 0x2c]
mov byte [edx + 0x67], cl
mov eax, dword [ebp + 8]
xor ecx, ecx
mov cx, word [eax + 0x22]
and ecx, 1
test ecx, ecx
je 0x4034ed
mov edx, dword [ebp - 0x2c]
xor eax, eax
mov al, byte [edx + 0x67]
shl eax, 4
shl eax, 2
mov ecx, 0x1e00
sub ecx, eax
mov edx, dword [ebp - 0x34]
movsx eax, byte [edx + 0x11]
cdq
sub eax, edx
sar eax, 1
sub ecx, eax
mov eax, dword [ebp - 0x2c]
mov dword [eax + 0x68], ecx
jmp 0x40350c
mov ecx, dword [ebp - 0x34]
movsx edx, byte [ecx + 0x11]
push edx
mov eax, dword [ebp - 0x2c]
xor ecx, ecx
mov cl, byte [eax + 0x67]
push ecx
call fcn.00402bd0
add esp, 8
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x68], eax
movsx eax, byte [ebp - 0x14]
test eax, eax
jne 0x403520
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x68]
mov dword [ecx + 0xc], eax
mov ecx, dword [ebp - 0x2c]
mov byte [ecx + 2], 8
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x1c], 0
mov eax, dword [ebp - 0x2c]
mov cl, byte [eax + 2]
or cl, 1
mov edx, dword [ebp - 0x2c]
mov byte [edx + 2], cl
mov eax, dword [ebp - 0x2c]
mov cl, byte [eax + 2]
or cl, 2
mov edx, dword [ebp - 0x2c]
mov byte [edx + 2], cl
mov eax, dword [ebp - 0xc]
xor ecx, ecx
mov cl, byte [eax + 1]
test ecx, ecx
je 0x40356b
mov edx, dword [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00403120
add esp, 8
mov ecx, dword [ebp - 0xc]
xor edx, edx
mov dl, byte [ecx + 2]
test edx, edx
je 0x40358a
mov eax, dword [ebp - 0xc]
mov cl, byte [eax + 2]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00402939
add esp, 8
mov eax, dword [ebp - 0xc]
xor ecx, ecx
mov cl, byte [eax]
cmp ecx, 0xff
je 0x4035a6
mov edx, dword [ebp - 0xc]
xor eax, eax
mov al, byte [edx + 3]
cmp eax, 0x14
jne 0x4035ad
mov ecx, dword [ebp - 0x2c]
mov byte [ecx + 0x65], 1
mov edx, dword [ebp - 0x18]
xor eax, eax
mov al, byte [edx + 0x14c]
and eax, 1
test eax, eax
je 0x403646
mov ecx, dword [ebp - 0x2c]
movsx edx, byte [ecx + 0x3c]
test edx, edx
jne 0x403644
push 2
mov eax, dword [ebp - 0x2c]
add eax, 0x38
push eax
mov ecx, dword [ebp - 0x2c]
add ecx, 0x3c
push ecx
mov edx, dword [ebp - 0x2c]
add edx, 0x30
push edx
mov eax, dword [ebp - 0x2c]
add eax, 0x34
push eax
mov ecx, dword [ebp - 0x18]
mov dl, byte [ecx + 0x146]
push edx
mov eax, dword [ebp - 0x18]
mov cl, byte [eax + 0x147]
push ecx
mov edx, dword [ebp - 0x18]
mov al, byte [edx + 0x148]
push eax
mov ecx, dword [ebp - 0x18]
add ecx, 0xa4
push ecx
mov edx, dword [ebp - 0x18]
xor eax, eax
mov al, byte [edx + 0x144]
push eax
mov ecx, dword [ebp - 0x18]
mov dl, byte [ecx + 0x14c]
push edx
mov eax, dword [ebp - 0x2c]
add eax, 0x28
push eax
mov ecx, dword [ebp - 0x2c]
add ecx, 0x2c
push ecx
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00402763
add esp, 0x38
jmp 0x40365b
mov eax, dword [ebp - 0x2c]
movsx ecx, byte [eax + 0x65]
test ecx, ecx
je 0x40365b
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x34], 0
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov cl, byte [eax + 0x14d]
and ecx, 1
test ecx, ecx
je 0x4036f2
mov edx, dword [ebp - 0x2c]
movsx eax, byte [edx + 0x54]
test eax, eax
jne 0x4036f2
push 4
mov ecx, dword [ebp - 0x2c]
add ecx, 0x50
push ecx
mov edx, dword [ebp - 0x2c]
add edx, 0x54
push edx
mov eax, dword [ebp - 0x2c]
add eax, 0x48
push eax
mov ecx, dword [ebp - 0x2c]
add ecx, 0x4c
push ecx
mov edx, dword [ebp - 0x18]
mov al, byte [edx + 0x149]
push eax
mov ecx, dword [ebp - 0x18]
mov dl, byte [ecx + 0x14a]
push edx
mov eax, dword [ebp - 0x18]
mov cl, byte [eax + 0x14b]
push ecx
mov edx, dword [ebp - 0x18]
add edx, 0xf4
push edx
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov cl, byte [eax + 0x145]
push ecx
mov edx, dword [ebp - 0x18]
mov al, byte [edx + 0x14d]
push eax
mov ecx, dword [ebp - 0x2c]
add ecx, 0x40
push ecx
mov edx, dword [ebp - 0x2c]
add edx, 0x44
push edx
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00402763
add esp, 0x38
mov ecx, dword [ebp - 0x2c]
movsx edx, byte [ecx + 0x65]
test edx, edx
je 0x403739
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov cx, word [eax + 0x152]
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x58]
sub eax, ecx
mov ecx, dword [ebp - 0x2c]
mov dword [ecx + 0x58], eax
mov edx, dword [ebp - 0x2c]
cmp dword [edx + 0x58], 0
jge 0x40372a
mov eax, dword [ebp - 0x2c]
mov dword [eax + 0x58], 0
mov ecx, dword [ebp - 0x2c]
mov dl, byte [ecx + 2]
or dl, 2
mov eax, dword [ebp - 0x2c]
mov byte [eax + 2], dl
mov ecx, dword [ebp - 0xc]
xor edx, edx
mov dl, byte [ecx + 3]
mov dword [ebp - 0x5c], edx
mov eax, dword [ebp - 0x5c]
sub eax, 1
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0x20
ja case.0x40375a.17
mov ecx, dword [ebp - 0x5c]
jmp dword [ecx*4 + 0x4040b6]
mov edx, dword [ebp - 0xc]
xor eax, eax
mov al, byte [edx + 4]
test eax, eax
je 0x403779
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0xc]
mov al, byte [edx + 4]
mov byte [ecx + 0x79], al
jmp case.0x40375a.17
mov ecx, dword [ebp - 0xc]
xor edx, edx
mov dl, byte [ecx + 4]
test edx, edx
je 0x403796
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0xc]
mov dl, byte [ecx + 4]
mov byte [eax + 0x78], dl
jmp case.0x40375a.17
mov eax, dword [ebp - 0xc]
xor ecx, ecx
mov cl, byte [eax + 4]
test ecx, ecx
je 0x4037b6
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0xc]
mov cl, byte [eax + 4]
mov byte [edx + 0x84], cl
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x68]
mov dword [edx + 0x80], ecx
mov edx, dword [ebp - 0x2c]
mov al, byte [edx + 2]
and al, 0xf7
mov ecx, dword [ebp - 0x2c]
mov byte [ecx + 2], al
mov edx, dword [ebp - 0x2c]
mov al, byte [edx + 2]
and al, 0xfe
mov ecx, dword [ebp - 0x2c]
mov byte [ecx + 2], al
jmp case.0x40375a.17
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x68]
mov dword [edx + 0x80], ecx
mov edx, dword [ebp - 0xc]
xor eax, eax
mov al, byte [edx + 4]
test eax, eax
je 0x40380d
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0xc]
mov al, byte [edx + 4]
mov byte [ecx + 0x7c], al
mov ecx, dword [ebp - 0x2c]
mov dl, byte [ecx + 2]
and dl, 0xf7
mov eax, dword [ebp - 0x2c]
mov byte [eax + 2], dl
mov ecx, dword [ebp - 0x2c]
mov dl, byte [ecx + 2]
and dl, 0xfe
mov eax, dword [ebp - 0x2c]
mov byte [eax + 2], dl
jmp case.0x40375a.17
mov ecx, dword [ebp - 0x28]
and ecx, 0xff
test ecx, ecx
je 0x403849
mov edx, dword [ebp - 0x2c]
mov al, byte [ebp - 0x28]
mov byte [edx + 0x86], al
mov ecx, dword [ebp - 0x20]
and ecx, 0xff
test ecx, ecx
je 0x403862
mov edx, dword [ebp - 0x2c]
mov al, byte [ebp - 0x20]
mov byte [edx + 0x87], al
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.0040227d
add esp, 4
jmp case.0x40375a.17
mov edx, dword [ebp - 0xc]
xor eax, eax
mov al, byte [edx + 4]
test eax, eax
je 0x40388b
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0xc]
mov al, byte [edx + 4]
mov byte [ecx + 0x7c], al
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.0040227d
add esp, 4
jmp case.0x40375a.17
mov edx, dword [ebp - 0x28]
and edx, 0xff
test edx, edx
je 0x4038b5
mov eax, dword [ebp - 0x2c]
mov cl, byte [ebp - 0x28]
mov byte [eax + 0x8a], cl
mov edx, dword [ebp - 0x20]
and edx, 0xff
test edx, edx
je 0x4038ce
mov eax, dword [ebp - 0x2c]
mov cl, byte [ebp - 0x20]
mov byte [eax + 0x8b], cl
jmp case.0x40375a.17
mov edx, dword [ebp - 0xc]
xor eax, eax
mov al, byte [edx + 4]
mov ecx, dword [ebp - 0x2c]
mov dword [ecx + 0x14], eax
mov edx, dword [ebp - 0x2c]
mov al, byte [edx + 2]
or al, 4
mov ecx, dword [ebp - 0x2c]
mov byte [ecx + 2], al
jmp case.0x40375a.17
mov edx, dword [ebp - 0xc]
xor eax, eax
mov al, byte [edx + 4]
test eax, eax
je 0x40390e
mov ecx, dword [ebp - 0xc]
xor edx, edx
mov dl, byte [ecx + 4]
mov eax, dword [ebp - 0x2c]
mov dword [eax + 0x70], edx
mov ecx, dword [ebp - 0x2c]
cmp dword [ecx + 4], 0
jne 0x40391c
jmp case.0x40375a.17
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x70]
shl eax, 8
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x34]
mov edx, dword [ecx + 8]
mov eax, dword [ebp - 0x34]
add edx, dword [eax + 0xc]
cmp dword [ebp - 0x38], edx
jb 0x403959
mov ecx, dword [ebp - 0x2c]
mov dl, byte [ecx + 2]
and dl, 0xf7
mov eax, dword [ebp - 0x2c]
mov byte [eax + 2], dl
mov ecx, dword [ebp - 0x2c]
mov dl, byte [ecx + 2]
or dl, 0x20
mov eax, dword [ebp - 0x2c]
mov byte [eax + 2], dl
jmp 0x403965
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 4]
mov eax, dword [ebp - 0x38]
mov dword [edx + 0x18], eax
jmp case.0x40375a.17
mov ecx, dword [ebp - 0xc]
xor edx, edx
mov dl, byte [ecx + 4]
test edx, edx
je 0x403982
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0xc]
mov dl, byte [ecx + 4]
mov byte [eax + 0x7c], dl
jmp case.0x40375a.17
mov eax, dword [ebp - 0xc]
xor ecx, ecx
mov cl, byte [eax + 4]
mov edx, dword [ebp + 8]
mov dword [edx + 0x150], ecx
mov eax, dword [ebp + 8]
mov dword [eax + 0x14c], 0
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 0x10]
mov eax, dword [ebp + 8]
cmp dword [eax + 0x150], edx
jl 0x4039c4
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x150], 0
mov byte [ebp - 4], 1
jmp case.0x40375a.17
mov edx, dword [ebp - 0xc]
xor eax, eax
mov al, byte [edx + 4]
mov ecx, dword [ebp - 0x2c]
mov dword [ecx + 0x10], eax
mov edx, dword [ebp - 0x2c]
mov al, byte [edx + 2]
or al, 2
mov ecx, dword [ebp - 0x2c]
mov byte [ecx + 2], al
jmp case.0x40375a.17
mov edx, dword [ebp - 0x28]
and edx, 0xff
imul edx, edx, 0xa
mov eax, dword [ebp - 0x20]
and eax, 0xff
add edx, eax
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x14c], edx
mov edx, dword [ebp + 8]
cmp dword [edx + 0x14c], 0x3f
jle 0x403a26
mov eax, dword [ebp + 8]
mov dword [eax + 0x14c], 0
movsx ecx, byte [ebp - 0x10]
test ecx, ecx
jne 0x403a4b
movsx edx, byte [ebp - 4]
test edx, edx
jne 0x403a4b
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x144]
add ecx, 1
mov edx, dword [ebp + 8]
mov dword [edx + 0x150], ecx
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 0x10]
mov edx, dword [ebp + 8]
cmp dword [edx + 0x150], ecx
jl 0x403a6a
mov eax, dword [ebp + 8]
mov dword [eax + 0x150], 0
jmp case.0x40375a.17
mov ecx, dword [ebp - 0x28]
and ecx, 0xff
mov dword [ebp - 0x60], ecx
mov edx, dword [ebp - 0x60]
sub edx, 1
mov dword [ebp - 0x60], edx
cmp dword [ebp - 0x60], 0xd
ja case.0x403a91.2
mov eax, dword [ebp - 0x60]
jmp dword [eax*4 + 0x40413a]
mov ecx, dword [ebp - 0x20]
and ecx, 0xff
test ecx, ecx
je 0x403ab1
mov edx, dword [ebp - 0x2c]
mov al, byte [ebp - 0x20]
mov byte [edx + 0xa8], al
mov ecx, dword [ebp - 0x2c]
xor edx, edx
mov dl, byte [ecx + 0xa8]
shl edx, 2
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0xc]
sub ecx, edx
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0xc], ecx
jmp case.0x403a91.2
mov eax, dword [ebp - 0x20]
and eax, 0xff
test eax, eax
je 0x403aea
mov ecx, dword [ebp - 0x2c]
mov dl, byte [ebp - 0x20]
mov byte [ecx + 0xa9], dl
mov eax, dword [ebp - 0x2c]
xor ecx, ecx
mov cl, byte [eax + 0xa9]
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0xc]
lea ecx, [eax + ecx*4]
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0xc], ecx
jmp case.0x403a91.2
mov eax, dword [ebp - 0x2c]
mov cl, byte [eax + 0xa2]
and cl, 0xf0
mov edx, dword [ebp - 0x2c]
mov byte [edx + 0xa2], cl
mov eax, dword [ebp - 0x2c]
mov cl, byte [eax + 0xa2]
or cl, byte [ebp - 0x20]
mov edx, dword [ebp - 0x2c]
mov byte [edx + 0xa2], cl
jmp case.0x403a91.2
mov eax, dword [ebp - 0x34]
mov cl, byte [ebp - 0x20]
mov byte [eax + 0x11], cl
jmp case.0x403a91.2
mov edx, dword [ebp - 0x20]
and edx, 0xff
test edx, edx
jne 0x403b67
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x140]
mov dword [eax + 0x98], edx
jmp 0x403bba
mov eax, dword [ebp - 0x2c]
cmp dword [eax + 0x9c], 0
jne 0x403b87
mov ecx, dword [ebp - 0x20]
and ecx, 0xff
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x9c], ecx
jmp 0x403b9c
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x9c]
sub ecx, 1
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x9c], ecx
mov eax, dword [ebp - 0x2c]
cmp dword [eax + 0x9c], 0
je 0x403bba
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x98]
mov dword [ecx + 0x14c], eax
jmp case.0x403a91.2
mov ecx, dword [ebp - 0x2c]
mov dl, byte [ecx + 0xa2]
and dl, 0xf
mov eax, dword [ebp - 0x2c]
mov byte [eax + 0xa2], dl
mov ecx, dword [ebp - 0x20]
and ecx, 0xff
shl ecx, 4
mov edx, dword [ebp - 0x2c]
mov al, byte [edx + 0xa2]
or al, cl
mov ecx, dword [ebp - 0x2c]
mov byte [ecx + 0xa2], al
jmp case.0x403a91.2
mov edx, dword [ebp - 0x20]
and edx, 0xff
shl edx, 4
mov eax, dword [ebp - 0x2c]
mov dword [eax + 0x14], edx
mov ecx, dword [ebp - 0x2c]
mov dl, byte [ecx + 2]
or dl, 4
mov eax, dword [ebp - 0x2c]
mov byte [eax + 2], dl
jmp case.0x403a91.2
mov ecx, dword [ebp - 0x20]
and ecx, 0xff
test ecx, ecx
je 0x403c38
mov edx, dword [ebp - 0x2c]
mov al, byte [ebp - 0x20]
mov byte [edx + 0xa7], al
mov ecx, dword [ebp - 0x2c]
xor edx, edx
mov dl, byte [ecx + 0xa7]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x10]
add ecx, edx
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x10], ecx
mov eax, dword [ebp - 0x2c]
cmp dword [eax + 0x10], 0x40
jle 0x403c64
mov ecx, dword [ebp - 0x2c]
mov dword [ecx + 0x10], 0x40
mov edx, dword [ebp - 0x2c]
mov al, byte [edx + 2]
or al, 2
mov ecx, dword [ebp - 0x2c]
mov byte [ecx + 2], al
jmp case.0x403a91.2
mov edx, dword [ebp - 0x20]
and edx, 0xff
test edx, edx
je 0x403c90
mov eax, dword [ebp - 0x2c]
mov cl, byte [ebp - 0x20]
mov byte [eax + 0xa7], cl
mov edx, dword [ebp - 0x2c]
xor eax, eax
mov al, byte [edx + 0xa7]
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 0x10]
sub edx, eax
mov eax, dword [ebp - 0x2c]
mov dword [eax + 0x10], edx
mov ecx, dword [ebp - 0x2c]
cmp dword [ecx + 0x10], 0
jge 0x403cbc
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x10], 0
mov eax, dword [ebp - 0x2c]
mov cl, byte [eax + 2]
or cl, 2
mov edx, dword [ebp - 0x2c]
mov byte [edx + 2], cl
jmp case.0x403a91.2
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
mov dword [eax + 0x10], ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x1c]
mov dword [edx + 0xc], eax
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x24]
mov dword [ecx + 0x14], edx
mov eax, dword [ebp - 0x2c]
mov cl, byte [eax + 2]
and cl, 0xfe
mov edx, dword [ebp - 0x2c]
mov byte [edx + 2], cl
mov eax, dword [ebp - 0x2c]
mov cl, byte [eax + 2]
and cl, 0xfd
mov edx, dword [ebp - 0x2c]
mov byte [edx + 2], cl
mov eax, dword [ebp - 0x2c]
mov cl, byte [eax + 2]
and cl, 0xfb
mov edx, dword [ebp - 0x2c]
mov byte [edx + 2], cl
mov eax, dword [ebp - 0x2c]
mov cl, byte [eax + 2]
and cl, 0xf7
mov edx, dword [ebp - 0x2c]
mov byte [edx + 2], cl
jmp case.0x403a91.2
mov eax, dword [ebp - 0x20]
and eax, 0xff
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x148], eax
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [edx + 0x148]
imul ecx, dword [eax + 0x138]
mov edx, dword [ebp + 8]
mov dword [edx + 0x148], ecx
jmp case.0x40375a.17
mov eax, dword [ebp - 0xc]
xor ecx, ecx
mov cl, byte [eax + 4]
cmp ecx, 0x20
jge 0x403d7b
mov edx, dword [ebp - 0xc]
xor eax, eax
mov al, byte [edx + 4]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x138], eax
jmp 0x403d90
mov edx, dword [ebp - 0xc]
xor eax, eax
mov al, byte [edx + 4]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00401000
add esp, 8
jmp case.0x40375a.17
mov edx, dword [ebp - 0xc]
xor eax, eax
mov al, byte [edx + 4]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x12c], eax
mov edx, dword [ebp + 8]
cmp dword [edx + 0x12c], 0x40
jle 0x403dbf
mov eax, dword [ebp + 8]
mov dword [eax + 0x12c], 0x40
mov ecx, dword [ebp - 0x2c]
mov dl, byte [ecx + 2]
or dl, 2
mov eax, dword [ebp - 0x2c]
mov byte [eax + 2], dl
jmp case.0x40375a.17
mov ecx, dword [ebp - 0xc]
xor edx, edx
mov dl, byte [ecx + 4]
test edx, edx
je 0x403dee
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dl, byte [ecx + 4]
mov byte [eax + 0x130], dl
jmp case.0x40375a.17
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov cl, byte [eax + 0x14c]
and ecx, 1
test ecx, ecx
jne 0x403e0a
jmp case.0x40375a.17
mov dword [ebp - 0x50], 0
mov edx, dword [ebp - 0xc]
xor eax, eax
mov al, byte [edx + 4]
mov ecx, dword [ebp - 0x50]
lea edx, [ecx + ecx + 2]
mov ecx, dword [ebp - 0x18]
xor esi, esi
mov si, word [ecx + edx*2 + 0xa4]
cmp eax, esi
jle 0x403e4c
mov edx, dword [ebp - 0x18]
xor eax, eax
mov al, byte [edx + 0x144]
cmp dword [ebp - 0x50], eax
jge 0x403e4c
mov ecx, dword [ebp - 0x50]
add ecx, 1
mov dword [ebp - 0x50], ecx
jmp 0x403e11
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x50]
mov dword [edx + 0x2c], eax
mov ecx, dword [ebp - 0x18]
xor edx, edx
mov dl, byte [ecx + 0x144]
sub edx, 1
mov eax, dword [ebp - 0x2c]
cmp dword [eax + 0x2c], edx
jl 0x403e99
mov ecx, dword [ebp - 0x18]
xor edx, edx
mov dl, byte [ecx + 0x144]
lea eax, [edx + edx - 2]
mov ecx, dword [ebp - 0x18]
xor edx, edx
mov dx, word [ecx + eax*2 + 0xa6]
mov eax, dword [ebp - 0x2c]
mov dword [eax + 0x34], edx
mov ecx, dword [ebp - 0x2c]
mov byte [ecx + 0x3c], 1
jmp case.0x40375a.17
mov edx, dword [ebp - 0x2c]
mov byte [edx + 0x3c], 0
mov eax, dword [ebp - 0xc]
xor ecx, ecx
mov cl, byte [eax + 4]
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x28], ecx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x2c]
add ecx, 1
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp - 0x50]
shl edx, 1
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov cx, word [eax + edx*2 + 0xa4]
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp - 0x48]
shl edx, 1
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov cx, word [eax + edx*2 + 0xa4]
mov dword [ebp - 0x54], ecx
mov edx, dword [ebp - 0x50]
shl edx, 1
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov cx, word [eax + edx*2 + 0xa6]
shl ecx, 0x10
mov dword [ebp - 0x4c], ecx
mov edx, dword [ebp - 0x48]
shl edx, 1
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov cx, word [eax + edx*2 + 0xa6]
shl ecx, 0x10
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x54]
sub edx, dword [ebp - 0x40]
mov dword [ebp - 0x44], edx
cmp dword [ebp - 0x44], 0
je 0x403f35
mov eax, dword [ebp - 0x3c]
sub eax, dword [ebp - 0x4c]
cdq
idiv dword [ebp - 0x44]
mov ecx, dword [ebp - 0x2c]
mov dword [ecx + 0x38], eax
jmp 0x403f3f
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x38], 0
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x28]
sub ecx, dword [ebp - 0x40]
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x38]
imul eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x4c]
add ecx, eax
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x30], ecx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x30]
sar ecx, 0x10
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x34], ecx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x2c]
add ecx, 1
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x2c], ecx
jmp case.0x40375a.17
mov eax, dword [ebp - 0xc]
xor ecx, ecx
mov cl, byte [eax + 4]
test ecx, ecx
je 0x403fa9
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0xc]
mov cl, byte [eax + 4]
mov byte [edx + 0x7d], cl
mov edx, dword [ebp - 0x2c]
mov al, byte [edx + 2]
or al, 4
mov ecx, dword [ebp - 0x2c]
mov byte [ecx + 2], al
jmp case.0x40375a.17
mov edx, dword [ebp - 0xc]
xor eax, eax
mov al, byte [edx + 4]
test eax, eax
je 0x403fcc
mov ecx, dword [ebp - 0x2c]
mov dl, byte [ebp - 0x28]
mov byte [ecx + 0x7e], dl
mov eax, dword [ebp - 0x2c]
mov cl, byte [ebp - 0x20]
mov byte [eax + 0x7f], cl
jmp case.0x40375a.17
mov edx, dword [ebp - 0xc]
xor eax, eax
mov al, byte [edx + 4]
test eax, eax
je 0x404006
mov ecx, dword [ebp - 0x28]
and ecx, 0xff
add ecx, 1
mov edx, dword [ebp - 0x2c]
mov byte [edx + 0x93], cl
mov eax, dword [ebp - 0x20]
and eax, 0xff
add eax, 1
mov ecx, dword [ebp - 0x2c]
mov byte [ecx + 0x94], al
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00402cf1
add esp, 4
jmp case.0x40375a.17
mov eax, dword [ebp - 0x28]
and eax, 0xff
cmp eax, 1
jne 0x40404f
mov ecx, dword [ebp - 0x20]
and ecx, 0xff
test ecx, ecx
je 0x404037
mov edx, dword [ebp - 0x2c]
mov al, byte [ebp - 0x20]
mov byte [edx + 0x7b], al
mov ecx, dword [ebp - 0x2c]
xor edx, edx
mov dl, byte [ecx + 0x7b]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0xc]
sub ecx, edx
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0xc], ecx
jmp case.0x40375a.17
mov eax, dword [ebp - 0x28]
and eax, 0xff
cmp eax, 2
jne case.0x40375a.17
mov ecx, dword [ebp - 0x20]
and ecx, 0xff
test ecx, ecx
je 0x404072
mov edx, dword [ebp - 0x2c]
mov al, byte [ebp - 0x20]
mov byte [edx + 0x7a], al
mov ecx, dword [ebp - 0x2c]
xor edx, edx
mov dl, byte [ecx + 0x7a]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0xc]
add ecx, edx
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0xc], ecx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.004023ad
add esp, 8
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.00402d74
add esp, 0xc
jmp 0x403297
pop esi
mov esp, ebp
pop ebp
ret