Function at 0x402800
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90
fild dword [0xb43cb0]
push ebx
push esi
push edi
xor ebx, ebx
fst dword [ebp - 0x5c]
fmul dword [0x461ab4]
xor eax, eax
mov dword [ebp - 0x54], ebx
mov ecx, 0x11
lea edi, [ebp - 0x50]
rep stosd dword es:[edi], eax
push ecx
fstp dword [esp]
call fcn.0042ff10
mov ecx, dword [0xb43cb0]
fstp dword [ebp - 0x6c]
add ecx, ecx
mov eax, 0x10624dd3
imul ecx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x100]
sar edx, 6
mov esi, edx
shr esi, 0x1f
add esi, edx
add esp, 4
cmp ecx, ebx
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x58], ebx
jle 0x40340c
jmp 0x402870
mov esi, dword [ebp - 0x78]
mov ecx, dword [ebp + 8]
mov edi, dword [ecx + 0x104]
add edi, dword [ebp - 0x58]
and edi, 0x3ff
imul edi, edi, 0x54
add edi, 0xb2d420
mov ecx, dword [edi]
mov ebx, dword [edi + 0x40]
imul ecx, ecx, 0x114
mov edx, dword [edi + 0x44]
add ecx, 0xb77ae0
test bh, 4
mov dword [ebp - 4], ecx
mov dword [ebp - 8], edx
je 0x4028b2
and esi, 1
mov dword [ebp - 0x38], esi
jmp 0x4028f1
test bh, 8
je 0x4028c2
and esi, 1
add esi, 2
mov dword [ebp - 0x38], esi
jmp 0x4028f1
test bh, 0x10
je 0x4028cc
mov dword [ebp - 0x38], esi
jmp 0x4028f1
test bh, 0x20
je 0x4028eb
mov eax, 0x51eb851f
imul dword [0xb43cb0]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x38], eax
jmp 0x4028f1
mov edx, dword [edi + 0x38]
mov dword [ebp - 0x38], edx
test ebx, 0x10000
mov edx, dword [ebp - 8]
je 0x402911
and ebx, 0xfffeffff
or ebx, 0x100
or edx, 0x400
mov dword [ebp - 8], edx
test bh, bh
jns 0x40292a
and ebx, 0xffff7fff
or ebx, 0x100
or edx, 0x1000
mov dword [ebp - 8], edx
test ebx, 0x8000000
je 0x402947
and ebx, 0xf7ffffff
or ebx, 0x100
or edx, 0x10000
mov dword [ebp - 8], edx
test ebx, 0x40000000
je 0x402964
and ebx, 0xbfffffff
or ebx, 0x100
or edx, 0x20000
mov dword [ebp - 8], edx
test dl, 0xc0
fld dword [0x461ab0]
fsub dword [0xb43cb8]
mov eax, dword [ecx + 0xe0]
mov dword [ebp - 0x28], eax
fstp dword [ebp - 0x24]
je 0x402a42
test dl, dl
jns 0x402a1c
fld dword [ecx + 0x70]
fsub dword [ecx + 0xc4]
fmul dword [0xb43cb8]
fadd dword [ecx + 0xc4]
fstp dword [ebp - 0x34]
fld dword [ecx + 0x74]
fsub dword [ecx + 0xc8]
fmul dword [0xb43cb8]
fadd dword [ecx + 0xc8]
fstp dword [ebp - 0x30]
fld dword [ecx + 0x78]
fsub dword [ecx + 0xcc]
fmul dword [0xb43cb8]
fadd dword [ecx + 0xcc]
fstp dword [ebp - 0x2c]
fld dword [ecx + 0x58]
fsub dword [ecx + 0xac]
fmul dword [0xb43cb8]
fadd dword [ecx + 0xac]
fstp dword [ebp - 0x44]
fld dword [ecx + 0x5c]
fsub dword [ecx + 0xb0]
fmul dword [0xb43cb8]
fadd dword [ecx + 0xb0]
fstp dword [ebp - 0x40]
fld dword [ecx + 0x60]
fsub dword [ecx + 0xb4]
fmul dword [0xb43cb8]
fadd dword [ecx + 0xb4]
jmp 0x402a90
mov eax, dword [ecx + 0x58]
mov dword [ebp - 0x44], eax
mov eax, dword [ecx + 0x5c]
mov dword [ebp - 0x40], eax
mov eax, dword [ecx + 0x60]
mov dword [ebp - 0x3c], eax
mov eax, dword [ecx + 0x70]
mov dword [ebp - 0x34], eax
mov eax, dword [ecx + 0x74]
mov ecx, dword [ecx + 0x78]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], ecx
jmp 0x402a93
fld dword [ecx + 0x58]
fsub dword [ecx + 0xac]
fmul dword [0xb43cb8]
fadd dword [ecx + 0xac]
fst dword [ebp - 0x34]
fstp dword [ebp - 0x44]
fld dword [ecx + 0x5c]
fsub dword [ecx + 0xb0]
fmul dword [0xb43cb8]
fadd dword [ecx + 0xb0]
fst dword [ebp - 0x30]
fstp dword [ebp - 0x40]
fld dword [ecx + 0x60]
fsub dword [ecx + 0xb4]
fmul dword [0xb43cb8]
fadd dword [ecx + 0xb4]
fst dword [ebp - 0x2c]
fstp dword [ebp - 0x3c]
mov esi, edx
and esi, 0x80
je 0x402acb
mov dword [ebp - 0x18], 0x3e99999a
call fcn.0042c0e0
mov edx, dword [edi + 0x3c]
mov ecx, eax
and ecx, 3
shl ecx, 3
sar edx, cl
mov dword [ebp - 0x54], 0
and edx, 0xff
mov dword [ebp - 0x20], edx
jmp 0x402be9
mov eax, dword [edi + 0x28]
cmp eax, 0xff
jne 0x402bd2
mov eax, dword [edi + 0x3c]
and eax, 0xff
lea eax, [eax + eax*8]
shl eax, 5
add eax, 0xb65998
mov ecx, dword [eax + 0x80]
test ecx, ecx
mov eax, dword [eax + 0xc8]
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x54], eax
je 0x402b0d
test eax, eax
jne 0x402b1e
mov ecx, dword [0xb77a18]
mov eax, dword [0xb77a60]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x54], eax
test edx, 0x40000
je 0x402be9
push 0xc
push str.players_male
push ecx
call fcn.00451b50
add esp, 0xc
test eax, eax
jne 0x402b62
push str.players_male_disguise.pcx
call dword [0x8c7254]
push str.players_male_tris.md2
mov dword [ebp - 0x14], eax
call dword [0x8c7250]
add esp, 8
mov dword [ebp - 0x54], eax
jmp 0x402be9
mov ecx, dword [ebp - 0x14]
push 0xe
push str.players_female
push ecx
call fcn.00451b50
add esp, 0xc
test eax, eax
jne 0x402b9a
push str.players_female_disguise.pcx
call dword [0x8c7254]
push str.players_female_tris.md2
mov dword [ebp - 0x14], eax
call dword [0x8c7250]
add esp, 8
mov dword [ebp - 0x54], eax
jmp 0x402be9
mov edx, dword [ebp - 0x14]
push 0xe
push str.players_cyborg
push edx
call fcn.00451b50
add esp, 0xc
test eax, eax
jne 0x402be9
push str.players_cyborg_disguise.pcx
call dword [0x8c7254]
push 0x4619e4
mov dword [ebp - 0x14], eax
call dword [0x8c7250]
add esp, 8
mov dword [ebp - 0x54], eax
jmp 0x402be9
mov ecx, dword [edi + 0x3c]
mov edx, dword [eax*4 + 0xb64d98]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x54], edx
mov ecx, dword [ebp - 8]
test cl, 0x20
je 0x402bfc
test esi, esi
jne 0x402bfc
mov dword [ebp - 0x18], 0x3f333333
mov eax, ebx
and eax, 0x100
mov dword [ebp - 0x60], eax
mov eax, 0
setne al
dec eax
and eax, ecx
test bl, 1
mov dword [ebp - 0x10], eax
je 0x402c32
mov ecx, dword [ebp - 0x6c]
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x48], 0
jmp 0x402d11
test ebx, 0x800000
je 0x402cd0
fld dword [ebp - 0x5c]
push ecx
fmul dword [0x4619e0]
mov dword [ebp - 0x50], 0
fstp dword [esp]
call fcn.0042ff10
fadd dword [edi + 0x14]
push 0
push 0
lea edx, [ebp - 0x84]
push edx
fstp dword [ebp - 0x4c]
lea eax, [ebp - 0x50]
push eax
mov dword [ebp - 0x48], 0x43340000
call fcn.0042fa50
fld dword [ebp - 0x84]
fmul dword [0x4619dc]
push 0
push 0
push 0x3f800000
fadd dword [ebp - 0x44]
lea ecx, [ebp - 0x90]
push 0x42c80000
push ecx
fstp dword [ebp - 0x90]
fld dword [ebp - 0x80]
fmul dword [0x4619dc]
fadd dword [ebp - 0x40]
fstp dword [ebp - 0x8c]
fld dword [ebp - 0x7c]
fmul dword [0x4619dc]
fadd dword [ebp - 0x3c]
fstp dword [ebp - 0x88]
call fcn.00416610
add esp, 0x28
jmp 0x402d11
mov edx, dword [ebp - 4]
xor esi, esi
add edx, 0xb8
mov dword [ebp - 0xc], edx
mov edi, edi
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax - 0x54]
mov edx, dword [eax]
mov eax, dword [0xb43cb8]
push eax
push ecx
push edx
mov dword [ebp - 0x70], ecx
mov dword [ebp - 0x74], edx
call fcn.0042fec0
fstp dword [ebp + esi*4 - 0x50]
mov ecx, dword [ebp - 0xc]
add esp, 0xc
inc esi
add ecx, 4
cmp esi, 3
mov dword [ebp - 0xc], ecx
jl 0x402ce0
mov eax, dword [0xb44590]
mov ecx, dword [edi]
inc eax
cmp ecx, eax
jne 0x402dca
mov ecx, dword [ebp - 0x10]
or ecx, 2
test ebx, 0x40000
mov dword [ebp - 0x10], ecx
je 0x402d57
push 0x3dcccccd
push 0x3dcccccd
push 0x3f800000
lea ecx, [ebp - 0x44]
push 0x43610000
push ecx
call fcn.00416610
add esp, 0x14
jmp 0x4033f4
test ebx, 0x80000
je 0x402d84
push 0x3f800000
push 0x3dcccccd
push 0x3dcccccd
lea edx, [ebp - 0x44]
push 0x43610000
push edx
call fcn.00416610
add esp, 0x14
jmp 0x4033f4
test ebx, 0x20000000
je 0x402dae
push 0
push 0x3f800000
push 0x3f800000
lea eax, [ebp - 0x44]
push 0x43610000
push eax
call fcn.00416610
add esp, 0x14
jmp 0x4033f4
test ebx, ebx
jns 0x4033f4
push 0xbf800000
push 0xbf800000
push 0xbf800000
jmp 0x402d41
mov eax, dword [edi + 0x28]
test eax, eax
je 0x4033f4
mov esi, ebx
and esi, 0x80
mov dword [ebp - 0xc], esi
mov ecx, 0x20
je 0x402df1
or dword [ebp - 0x10], ecx
mov dword [ebp - 0x18], 0x3e99999a
mov eax, ebx
and eax, 0x1000000
mov dword [ebp - 0x68], eax
je 0x402e07
or dword [ebp - 0x10], ecx
mov dword [ebp - 0x18], 0x3f19999a
test ebx, 0x10000000
je 0x402e29
mov edx, dword [ebp - 0x10]
or edx, ecx
test ebx, ebx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x18], 0x3f19999a
js 0x402e29
mov dword [ebp - 0x18], 0x3e99999a
lea edx, [ebp - 0x54]
push edx
call fcn.00416590
mov eax, dword [ebp - 0x60]
add esp, 4
test eax, eax
je 0x402e58
mov eax, dword [ebp - 8]
or eax, 0x20
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x54]
push eax
mov dword [ebp - 0x18], 0x3e99999a
call fcn.00416590
add esp, 4
mov edx, dword [edi + 0x2c]
xor eax, eax
cmp edx, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x18], eax
je 0x402f1c
cmp edx, 0xff
jne 0x402ecc
mov eax, dword [edi + 0x3c]
mov esi, dword [0xbbcafc]
mov ecx, eax
and ecx, edx
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, 0xb65998
sar eax, 8
cmp dword [esi + 0x20], 0
je 0x402ea0
cmp eax, 0x13
jle 0x402ea2
xor eax, eax
mov esi, dword [ecx + eax*4 + 0xcc]
test esi, esi
mov dword [ebp - 0x54], esi
jne 0x402ed6
test eax, eax
je 0x402ebd
mov esi, dword [ecx + 0xcc]
mov dword [ebp - 0x54], esi
test esi, esi
jne 0x402ed6
mov ecx, dword [0xb77a64]
mov dword [ebp - 0x54], ecx
jmp 0x402ed6
mov eax, dword [edx*4 + 0xb64d98]
mov dword [ebp - 0x54], eax
shl edx, 6
add edx, 0xb44d98
push 0x4619c0
push edx
call fcn.00455a93
add esp, 8
test eax, eax
jne 0x402eff
mov dword [ebp - 0x18], 0x3ea3d70a
mov dword [ebp - 0x10], 0x20
lea ecx, [ebp - 0x54]
push ecx
call fcn.00416590
mov esi, dword [ebp - 0xc]
add esp, 4
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0
mov eax, dword [edi + 0x30]
test eax, eax
je 0x402f39
mov edx, dword [eax*4 + 0xb64d98]
lea eax, [ebp - 0x54]
push eax
mov dword [ebp - 0x54], edx
call fcn.00416590
add esp, 4
mov eax, dword [edi + 0x34]
test eax, eax
je 0x402f56
mov ecx, dword [eax*4 + 0xb64d98]
lea edx, [ebp - 0x54]
push edx
mov dword [ebp - 0x54], ecx
call fcn.00416590
add esp, 4
test bh, 2
je 0x402f89
mov eax, dword [0xb2cec0]
mov dword [ebp - 0x54], eax
xor eax, eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x54]
or eax, 0x820
push ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x18], 0x3e99999a
call fcn.00416590
add esp, 4
test ebx, 0xfffffffe
je 0x4033d6
test bl, 0x10
je 0x402fcf
mov eax, dword [ebp - 4]
push eax
lea edx, [ebp - 0x44]
push edx
add eax, 0x104
push eax
call fcn.004054e0
push 0
push 0x3e6b851f
push 0x3f800000
lea eax, [ebp - 0x44]
push 0x43480000
push eax
call fcn.00416610
add esp, 0x20
jmp 0x4033d6
test bl, 8
je 0x403021
mov edx, dword [ebp - 4]
lea ecx, [ebp - 0x44]
add edx, 0x104
test ebx, 0x4000000
push ecx
push edx
je 0x40300e
call fcn.0040f530
push 0
push 0x3f800000
push 0
lea eax, [ebp - 0x44]
push 0x43480000
push eax
call fcn.00416610
add esp, 0x1c
jmp 0x4033d6
call fcn.00404c60
push 0
push 0x3f800000
push 0x3f800000
jmp 0x402ff8
test bl, 0x40
je 0x40305e
test ebx, 0x4000000
je 0x403045
push 0
push 0x3f800000
push 0
push 0x43480000
lea ecx, [ebp - 0x44]
push ecx
jmp 0x4033ce
push 0x3f800000
push 0x3f800000
push 0x3f800000
push 0x437a0000
jmp 0x4033ca
test bl, 2
je 0x40307f
mov eax, dword [ebp - 4]
push ebx
push eax
lea ecx, [ebp - 0x44]
push ecx
add eax, 0x104
push eax
call fcn.004050e0
add esp, 0x10
jmp 0x4033d6
test bl, 0x20
je 0x4030a0
mov eax, dword [ebp - 4]
push ebx
push eax
lea edx, [ebp - 0x44]
push edx
add eax, 0x104
push eax
call fcn.004050e0
add esp, 0x10
jmp 0x4033d6
test bh, 0x40
je 0x4030ba
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0x44]
push eax
push ecx
call fcn.00405eb0
add esp, 8
jmp 0x4033d6
test esi, esi
je 0x403105
test bh, 0x20
je 0x4030d8
lea edx, [ebp - 0x54]
push edx
call fcn.00405f60
add esp, 4
mov dword [ebp - 0x64], 0x43480000
jmp 0x4030ef
mov edi, dword [edi + 0x38]
cmp edi, 6
jbe 0x4030e5
mov edi, 6
fld dword [edi*4 + 0x47b040]
fstp dword [ebp - 0x64]
mov eax, dword [ebp - 0x64]
push 0
push 0x3f800000
push 0
push eax
lea ecx, [ebp - 0x44]
push ecx
jmp 0x4033ce
test ebx, 0x2000000
je 0x403169
fld dword [ebp - 0x3c]
lea edx, [ebp - 0x54]
fadd dword [0x4619bc]
push edx
fstp dword [ebp - 0x3c]
call fcn.00406160
call fcn.0042c0e0
xor edx, edx
mov ecx, 0x64
div ecx
add edx, ecx
test edx, edx
mov dword [ebp - 0x68], edx
fild dword [ebp - 0x68]
jge 0x403142
fadd dword [0x4619b8]
push 0x3dcccccd
fstp dword [ebp - 0x60]
mov edx, dword [ebp - 0x60]
push 0x3f4ccccd
push 0x3f800000
push edx
lea eax, [ebp - 0x44]
push eax
call fcn.00416610
add esp, 0x18
jmp 0x4033d6
test ebx, 0x40000
je 0x4031ae
mov edx, dword [ebp - 4]
push 0xf2
lea ecx, [ebp - 0x44]
push ecx
add edx, 0x104
push edx
call fcn.00404f60
push 0x3dcccccd
push 0x3dcccccd
push 0x3f800000
lea eax, [ebp - 0x44]
push 0x43610000
push eax
call fcn.00416610
add esp, 0x20
jmp 0x4033d6
test ebx, 0x80000
je 0x4031dc
mov edx, dword [ebp - 4]
push 0x73
lea ecx, [ebp - 0x44]
push ecx
add edx, 0x104
push edx
call fcn.00404f60
push 0x3f800000
push 0x3dcccccd
push 0x3dcccccd
jmp 0x403198
test ebx, 0x20000000
je 0x403205
mov edx, dword [ebp - 4]
push 0xdc
lea ecx, [ebp - 0x44]
push ecx
add edx, 0x104
push edx
call fcn.0040ef60
push 0
push 0x3f800000
jmp 0x403193
test ebx, ebx
jns 0x4032bc
test ebx, 0x4000000
je 0x403288
fld dword [ebp - 0x5c]
sub esp, 8
fmul dword [0x4619b4]
fstp qword [esp]
call fcn.00451ab4
fadd dword [0x461ab0]
mov eax, dword [0xcc05a4]
add esp, 8
cmp eax, 1
fmul dword [0x4619b0]
fadd dword [0x4619ac]
fstp dword [ebp - 0xc]
jne 0x403263
mov ecx, dword [ebp - 0xc]
push 0xbf800000
push 0xbf800000
push 0xbf800000
push ecx
jmp 0x4033ca
fld dword [ebp - 0xc]
push 0x3f800000
fmul dword [0x4619a8]
push 0x3f800000
push 0x3f800000
push ecx
lea eax, [ebp - 0x44]
fstp dword [esp]
push eax
jmp 0x4033ce
mov ecx, dword [ebp - 4]
add ecx, 0x104
push ecx
call fcn.0040e800
push 0xbf800000
push 0xbf800000
push 0xbf800000
lea edx, [ebp - 0x44]
push 0x431b0000
push edx
call fcn.00416610
add esp, 0x18
jmp 0x4033d6
test ebx, 0x4000000
je 0x40331c
mov ecx, dword [ebp - 4]
push 0
lea eax, [ebp - 0x44]
push eax
add ecx, 0x104
push ecx
call fcn.0040e630
mov eax, dword [0xcc05a4]
add esp, 0xc
cmp eax, 1
jne 0x4032ff
push 0xbf800000
push 0xbf800000
push 0xbf800000
push 0x43480000
jmp 0x4033ca
push 0x3f800000
push 0x3f800000
push 0x3f800000
push 0xc3480000
lea eax, [ebp - 0x44]
push eax
jmp 0x4033ce
test ebx, 0x200000
je 0x403340
mov eax, dword [ebp - 4]
push ebx
push eax
lea ecx, [ebp - 0x44]
push ecx
add eax, 0x104
push eax
call fcn.004050e0
add esp, 0x10
jmp 0x4033d6
test ebx, 0x100000
je 0x40337c
mov eax, dword [ebp - 4]
lea edx, [ebp - 0x44]
push edx
add eax, 0x104
push eax
call fcn.004059b0
push 0x3f000000
push 0x3f000000
push 0x3f800000
lea ecx, [ebp - 0x44]
push 0x42c80000
push ecx
call fcn.00416610
add esp, 0x1c
jmp 0x4033d6
test ebx, 0x400000
je 0x403394
push 0x3f800000
push 0
push 0
push 0x43480000
jmp 0x4033ca
mov eax, dword [ebp - 0x68]
test eax, eax
je 0x4033d6
test bh, 0x20
je 0x4033b6
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0x44]
push eax
add ecx, 0x104
push ecx
call fcn.00404c60
add esp, 8
push 0x3f000000
push 0x3f000000
push 0x3f800000
push 0x43020000
lea edx, [ebp - 0x44]
push edx
call fcn.00416610
add esp, 0x14
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x40]
mov dword [eax + 0x104], ecx
mov ecx, dword [ebp - 0x3c]
mov dword [eax + 0x108], edx
mov dword [eax + 0x10c], ecx
mov eax, dword [ebp - 0x58]
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 0x100]
inc eax
cmp eax, ecx
mov dword [ebp - 0x58], eax
jl 0x40286d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret