Function at 0x4813c0
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0x618
mov edx, dword [esp + 0x630]
push ebx
push ebp
mov ebp, dword [esp + 0x62c]
movsx ebx, word [edx + 0x28]
mov dword [esp + 0xc], ecx
push esi
mov ecx, dword [ebp + 0x11c]
cmp ebx, 0x2710
push edi
mov dword [esp + 0x30], ecx
jb 0x482108
movsx eax, word [esp + 0x63c]
sub ebx, 0x2710
sub eax, 0xd4
mov dword [esp + 0x2c], ebx
je 0x481427
dec eax
je 0x48143a
sub eax, 3
je 0x48143a
mov edi, dword [esp + 0x630]
mov dword [esp + 0x638], edi
jmp 0x481441
lea eax, [ebx - 1]
cmp eax, 1
mov ebx, eax
ja 0x481436
mov ebx, 1
mov dword [esp + 0x2c], ebx
mov edi, dword [esp + 0x638]
cmp byte [ecx], 0x62
jne 0x4814aa
cmp byte [edx + 0x30], 0x49
jne 0x4814aa
mov ecx, dword [ebp + 0x120]
mov esi, dword [ebp + 0x2bc]
cmp ecx, 0x1312d00
jbe 0x481478
mov eax, 0x51eb851f
mul esi
shr edx, 5
mov eax, ecx
mov ecx, edx
xor edx, edx
div ecx
cmp al, 0x64
jae 0x4814aa
jmp 0x481489
lea eax, [ecx + ecx*4]
xor edx, edx
lea eax, [eax + eax*4]
shl eax, 2
div esi
cmp al, 0x64
jae 0x4814aa
and eax, 0xff
cmp eax, 0x32
jge 0x4814aa
mov eax, dword [ebp + 0x118]
test eax, eax
jle 0x4814aa
dec eax
mov dword [ebp + 0x120], esi
mov dword [ebp + 0x118], eax
mov eax, dword [esp + 0x648]
mov esi, dword [esp + 0x62c]
test eax, eax
jne 0x48150e
mov eax, dword [esp + 0x630]
mov dx, word [edi]
cmp dx, word [eax]
jne 0x4814df
mov cx, word [edi + 2]
cmp cx, word [eax + 2]
jne 0x4814df
mov dl, byte [edi + 4]
mov cl, byte [eax + 4]
cmp dl, cl
je 0x48150e
mov eax, dword [esp + 0x630]
push edi
push eax
call dword [sym.imp.Staff2.dll_char___cdecl_STAFFGetDirection_struct_PIS___struct_PIS__]
add esp, 8
cmp al, 5
je 0x4814f8
mov byte [esi + 0x18], al
mov ecx, dword [esp + 0x630]
mov edx, dword [esp + 0x14]
push ebp
push ecx
push esi
lea ecx, [edx + 0x40]
call fcn.0040a390
mov ecx, 0x160
xor eax, eax
lea edi, [esp + 0xa4]
lea edx, [esp + 0x34]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x10]
lea ecx, [esp + 0x64]
push eax
mov eax, dword [esp + 0x63c]
push ecx
push edx
mov edx, dword [esp + 0x20]
push ebx
lea ecx, [esp + 0x7c]
push eax
push ecx
mov ecx, dword [edx + 0xc8]
mov dword [esp + 0x30], 0
call fcn.00488600
test eax, eax
je 0x48206f
mov ecx, dword [esp + 0x630]
mov edx, dword [esp + 0x640]
mov edi, dword [esp + 0x14]
jmp 0x48157e
mov edx, dword [esp + 0x640]
mov ecx, dword [esp + 0x630]
mov eax, dword [esp + 0x648]
test eax, eax
mov eax, dword [esp + 0x10]
jne 0x4815a8
cmp dword [eax + 0x43a4], 2
je 0x482037
mov esi, dword [ebp + 0x120]
test esi, esi
je 0x482037
cmp dword [eax + 0x43a4], 1
lea esi, [eax + 0x37d8]
lea ebx, [eax + 0x42d0]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x28], ebx
jne 0x482037
mov eax, dword [ebp + 0x11c]
cmp byte [eax], 0x62
je 0x4815df
mov eax, dword [ebx + 0x60]
test eax, eax
je 0x482037
mov eax, dword [edi + 0xb8]
cmp eax, 2
je 0x48161a
cmp eax, 1
je 0x48161a
cmp byte [edx + 0x30], 0x49
je 0x481653
push ecx
lea ecx, [esp + 0x68]
push ecx
mov ecx, dword [edi + 0x34]
call fcn.00486030
test eax, eax
je 0x482037
test byte [esi + 0x84e], 8
jne 0x482037
jmp 0x481653
cmp byte [edx + 0x30], 0x49
je 0x481636
lea edx, [esp + 0x64]
push ecx
mov ecx, dword [edi + 0x34]
push edx
call fcn.00486030
test eax, eax
je 0x482037
mov eax, dword [ebp + 0x11c]
mov al, byte [eax]
cmp al, 0x62
je 0x481653
cmp al, 0x61
je 0x481653
test byte [esi + 0x84e], 8
jne 0x482037
mov edx, dword [esp + 0x640]
mov ecx, dword [esi + 0x79c]
mov dword [esp + 0x70], ecx
mov edi, 1
cmp byte [edx + 0x30], 0x2b
je 0x4816a3
movsx eax, word [esp + 0x63c]
mov ecx, dword [esp + 0x62c]
mov edx, dword [ebx + 0x94]
push eax
lea eax, [esp + 0x38]
push eax
mov eax, dword [ebp + 0x2ac]
push ecx
mov ecx, dword [esp + 0x20]
push edx
push eax
mov ecx, dword [ecx + 0x3c]
call fcn.0045fab0
mov edi, eax
jmp 0x4816b8
call dword [sym.imp.MSVCRT.dll_rand]
cdq
mov ecx, 0x64
idiv ecx
cmp edx, 0x14
jbe 0x4816b8
xor edi, edi
mov edx, dword [esp + 0x18]
lea eax, [edx + 0x2f]
cmp eax, 0x582
mov dword [esp + 0x24], eax
ja 0x48206f
mov eax, dword [esp + 0x50]
mov dword [esp + 0x20], 0
and eax, 0x100
cmp eax, 0x100
jne 0x4817a7
mov eax, dword [esp + 0x648]
test eax, eax
jne 0x4817a7
test edi, edi
jne 0x48170b
mov edi, 1
mov dword [esp + 0x20], edi
jmp 0x4817a7
mov ecx, dword [ebx + 0x94]
mov edx, dword [ebx + 0x44]
add ecx, edx
cmp ecx, 0x1b58
mov eax, ecx
jb 0x481725
mov eax, 0x1b58
lea edx, [eax + eax*2]
mov eax, 0x5d9f7391
mul edx
shr edx, 7
add edx, 0x14
cmp edx, 0x50
jbe 0x481741
mov esi, 0x50
jmp 0x48178d
cmp ecx, 0x1b58
mov eax, ecx
jb 0x481750
mov eax, 0x1b58
lea edx, [eax + eax*2]
mov eax, 0x5d9f7391
mul edx
shr edx, 7
add edx, 0x14
cmp edx, 0x14
jae 0x48176c
mov esi, 0x14
jmp 0x48178d
cmp ecx, 0x1b58
mov eax, ecx
jb 0x48177b
mov eax, 0x1b58
lea ecx, [eax + eax*2]
mov eax, 0x5d9f7391
mul ecx
mov esi, edx
shr esi, 7
add esi, 0x14
call dword [sym.imp.MSVCRT.dll_rand]
cdq
mov ecx, 0x64
idiv ecx
cmp edx, esi
jae 0x4817a7
mov dword [esp + 0x20], 1
mov edx, dword [esp + 0x30]
mov dl, byte [edx]
cmp dl, 0x4e
jne 0x4817bc
mov dword [esp + 0x20], 0
jmp 0x4817d2
cmp dl, 0x62
jne 0x4817c9
mov dword [esp + 0x20], 0
cmp edi, 1
jne 0x48200f
mov eax, dword [esp + 0x640]
mov al, byte [eax + 0x30]
movsx ecx, al
cmp ecx, 0x49
ja case.0x4817f0.6
xor ebx, ebx
call dword [sym.imp.rm3944.dll_NewMassAnih]
jmp dword [ebx*4 + 0x482118]
mov ebx, dword [esp + 0x644]
test ebx, ebx
jne 0x48180f
mov ebx, dword [ebp + 0x2c4]
mov dword [esp + 0x644], ebx
mov ecx, dword [esp + 0x20]
test ecx, ecx
jne 0x481b3a
cmp al, 0x2b
jne 0x481909
mov eax, 0x88888889
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mul dword [ebp + 0x2ac]
mov esi, edx
shr esi, 4
call edi
xor edx, edx
mov ecx, 5
div ecx
test edx, edx
je 0x481856
call edi
xor edx, edx
mov ecx, 5
div ecx
mov esi, edx
inc esi
test byte [esp + 0x50], 1
jne 0x4818b1
mov edx, dword [esp + 0x52]
and edx, 0x800
test dx, dx
jne 0x4818b1
mov edi, dword [esp + 0x14]
cmp dword [edi + 0xb8], 1
je 0x481891
mov ecx, edi
call fcn.00476da0
cmp eax, 1
je 0x481891
mov ecx, edi
call fcn.00476de0
cmp eax, 1
jne 0x481896
mov esi, 5
mov ecx, dword [esp + 0x10]
push 0
push 0
push 0
push esi
push 0x10
call fcn.0042b2d0
cmp eax, 1
jne 0x4818b1
or byte [esp + 0x50], al
mov eax, dword [esp + 0x1c]
test byte [eax + 0x855], 0x30
jne 0x4818cc
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x14]
call fcn.0042e830
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x62c]
cmp ebx, 0x4c4b40
push 2
push edx
jge 0x4819d6
mov eax, dword [esp + 0x648]
mov ecx, dword [eax + 0x34]
mov eax, 0x51eb851f
imul ecx, ebx
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
jmp 0x4819f2
cmp al, 0x46
jne 0x48197a
cmp dword [esp + 0x648], 1
je 0x4818cc
push 0x1c
call sub.MFC42.DLL_operatornew
mov edx, dword [esp + 0x630]
mov ecx, dword [esp + 0x63c]
mov esi, eax
add esp, 4
mov dword [esi], edx
mov dword [esi + 4], ebp
mov edx, dword [ecx]
lea eax, [esi + 8]
mov dword [esi + 8], edx
mov cx, word [ecx + 4]
mov word [esi + 0xe], 2
mov word [eax + 4], cx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dx, word [esp + 0x63c]
mov ecx, dword [esp + 0x14]
mov dword [esi + 0x18], eax
mov eax, dword [esp + 0x640]
push esi
mov word [esi + 0x10], dx
mov dword [esi + 0x14], eax
call fcn.004829e0
jmp 0x4818cc
cmp al, 0x47
jne 0x4819b5
mov edi, dword [esp + 0x1c]
mov eax, 0x51eb851f
mov ecx, dword [esp + 0x10]
push 0
mul dword [edi + 0x790]
push 0
push 0
shr edx, 5
push edx
push 0x1b
call fcn.0042b2d0
cmp eax, 1
jne 0x4818d0
or byte [esp + 0x51], 8
jmp 0x4818d0
mov edi, dword [esp + 0x1c]
cmp al, 0x48
jne 0x4818d0
mov ecx, dword [edi + 0x7a0]
push ecx
mov ecx, dword [esp + 0x14]
call fcn.004396e0
jmp 0x4818d0
mov eax, 0x51eb851f
mov ecx, dword [esp + 0x648]
imul ebx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, dword [ecx + 0x34]
mov ecx, dword [esp + 0x18]
push edx
call fcn.004101f0
mov edx, dword [esp + 0x640]
mov esi, eax
mov dword [esp + 0x644], esi
cmp byte [edx + 0x30], 0x49
jne 0x481ad2
mov al, byte [edi + 0x84e]
and al, 8
cmp al, 8
jne 0x481a38
mov ecx, dword [esp + 0x10]
push 1
push 0
push 0x13
call fcn.0042cb70
and word [esp + 0x50], 0xfff7
mov cl, byte [edi + 0x850]
and cl, 8
cmp cl, 8
jne 0x481a5c
mov ecx, dword [esp + 0x10]
push 1
push 0
push 0x23
call fcn.0042cb70
and word [esp + 0x52], 0xfff7
mov dx, word [edi + 0x84e]
and edx, 0x400
cmp edx, 0x400
jne 0x481a87
mov ecx, dword [esp + 0x10]
push 1
push 0
push 0x1a
call fcn.0042cb70
and word [esp + 0x50], 0xfbff
mov al, byte [edi + 0x84c]
and al, 0x40
cmp al, 0x40
jne 0x481ab7
mov ecx, dword [edi + 0x7a0]
push ecx
mov ecx, dword [esp + 0x14]
call fcn.004396e0
mov ecx, dword [esp + 0x10]
push 1
push 1
push 6
call fcn.0042cb70
jmp case.0x4817f0.6
mov edx, dword [esp + 0x62c]
mov ecx, dword [esp + 0x10]
push 0x3c
inc edx
push ebp
push edx
push esi
call fcn.004393c0
jmp case.0x4817f0.6
mov al, byte [edi + 0x84c]
and al, 0x40
cmp al, 0x40
jne 0x481b1f
mov eax, esi
mov ecx, dword [esp + 0x10]
cdq
and edx, 3
add eax, edx
sar eax, 2
lea eax, [eax + esi*2]
push eax
mov dword [esp + 0x648], eax
call fcn.004396e0
mov eax, dword [edi + 0x7a0]
test eax, eax
jne case.0x4817f0.6
mov ecx, dword [esp + 0x10]
push 1
push 1
push 6
call fcn.0042cb70
jmp case.0x4817f0.6
mov ecx, dword [esp + 0x62c]
push 0
inc ecx
push ebp
push ecx
mov ecx, dword [esp + 0x1c]
push esi
call fcn.004393c0
jmp case.0x4817f0.6
cmp al, 0x2b
jne 0x481b88
mov eax, 0x1b4e81b5
mov ebx, dword [esp + 0x630]
mul dword [ebp + 0x2ac]
mov esi, dword [esp + 0x62c]
mov edi, dword [esp + 0x14]
push 0
push 0
shr edx, 4
push edx
push ebp
push ebx
push esi
push 0x10
mov ecx, edi
call fcn.00479630
push 1
push 1
push ebp
push ebx
push esi
push 0x1a
mov ecx, edi
call fcn.0047b980
mov ebx, dword [esp + 0x644]
jmp 0x481b93
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x62c]
mov edx, dword [esp + 0x640]
mov eax, dword [esp + 0x638]
mov ecx, dword [esp + 0x10]
push edx
mov edx, dword [esp + 0x2c]
push ebx
push ebp
push eax
mov eax, dword [esp + 0x2c]
push esi
push ecx
mov ecx, dword [edi + 0x3c]
push edx
push eax
call fcn.0045f890
jmp case.0x4817f0.6
cmp dl, 0x4e
jne 0x481bfe
mov ecx, dword [esp + 0x10]
push 1
push 0
push 0
push 0xb4
push 0x3b
call fcn.0042b2d0
cmp eax, 1
jne case.0x4817f0.6
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x14]
push edx
call fcn.00428fc0
jmp case.0x4817f0.6
mov eax, dword [esp + 0x20]
push 0
test eax, eax
push 0
jne 0x481c35
mov eax, dword [esp + 0x648]
push 0
mov ecx, dword [eax + 0x38]
push ecx
mov ecx, dword [esp + 0x20]
push 5
call fcn.0042b2d0
cmp eax, 1
jne case.0x4817f0.6
or byte [esp + 0x4e], 0x20
jmp case.0x4817f0.6
mov edx, dword [esp + 0x648]
mov ecx, dword [esp + 0x638]
mov eax, dword [edx + 0x38]
mov edx, dword [esp + 0x634]
push eax
push ebp
push ecx
mov ecx, dword [esp + 0x28]
push edx
push 5
call fcn.00479630
jmp case.0x4817f0.6
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x481cc8
mov esi, dword [esp + 0x14]
cmp dword [esi + 0xb8], 1
je 0x481c9e
mov ecx, esi
call fcn.00476da0
cmp eax, 1
je 0x481c9e
mov ecx, esi
call fcn.00476de0
cmp eax, 1
je 0x481c9e
mov eax, 0x1b4e81b5
mul dword [ebp + 0x2ac]
shr edx, 4
jmp 0x481ca3
mov edx, 5
mov ecx, dword [esp + 0x10]
push 0
push 0
push 0
push edx
push 0xd
call fcn.0042b2d0
cmp eax, 1
jne case.0x4817f0.6
or byte [esp + 0x4f], 0x20
jmp case.0x4817f0.6
mov eax, 0x88888889
mov ecx, dword [esp + 0x62c]
mul dword [ebp + 0x2ac]
mov eax, dword [esp + 0x630]
push 0
shr edx, 4
push 0
push edx
push ebp
push eax
push ecx
mov ecx, dword [esp + 0x2c]
push 0xd
call fcn.00479630
jmp case.0x4817f0.6
cmp dl, 0x4e
je 0x481d39
mov eax, dword [esp + 0x20]
test eax, eax
je 0x481d39
mov edx, dword [esp + 0x640]
mov ecx, dword [esp + 0x630]
push 0
push 0
mov eax, dword [edx + 0x38]
mov edx, dword [esp + 0x634]
push eax
push ebp
push ecx
mov ecx, dword [esp + 0x28]
push edx
push 0x10
call fcn.00479630
jmp case.0x4817f0.6
mov eax, dword [esp + 0x640]
push 0
push 0
push 0
mov ecx, dword [eax + 0x38]
push ecx
mov ecx, dword [esp + 0x20]
push 0x10
call fcn.0042b2d0
cmp eax, 1
jne case.0x4817f0.6
or byte [esp + 0x50], al
jmp case.0x4817f0.6
mov esi, dword [esp + 0x14]
cmp dword [esi + 0xb8], 1
je 0x481d9c
mov ecx, esi
call fcn.00476da0
cmp eax, 1
je 0x481d9c
mov ecx, esi
call fcn.00476de0
cmp eax, 1
je 0x481d9c
mov eax, 0x88888889
mul dword [ebp + 0x2ac]
shr edx, 4
jmp 0x481da1
mov edx, 5
mov ecx, dword [esp + 0x10]
push 0
push 0
push 0
push edx
push 0x12
call fcn.0042b2d0
test eax, eax
je 0x481e2e
mov edx, dword [esp + 0x28]
or byte [esp + 0x50], 4
mov eax, dword [edx + 0x10]
push eax
jmp 0x481e25
mov esi, dword [esp + 0x14]
mov edi, 1
cmp dword [esi + 0xb8], edi
je 0x481dfd
mov ecx, esi
call fcn.00476da0
cmp eax, edi
je 0x481dfd
mov ecx, esi
call fcn.00476de0
cmp eax, edi
je 0x481dfd
mov eax, 0x1b4e81b5
mul dword [ebp + 0x2ac]
shr edx, 4
jmp 0x481e02
mov edx, 5
mov ecx, dword [esp + 0x10]
push 0
push 0
push 0
push edx
push 0x10
call fcn.0042b2d0
test eax, eax
je 0x481e2e
mov ecx, dword [esp + 0x28]
or word [esp + 0x50], di
mov edx, dword [ecx + 0x10]
push edx
mov ecx, dword [esp + 0x14]
call fcn.004396e0
mov dword [esp + 0x20], 0
mov eax, dword [esp + 0x70]
test eax, eax
je 0x481e83
mov ecx, dword [esp + 0x1c]
cmp eax, dword [ecx + 0x79c]
jne 0x481e83
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x481f38
mov eax, dword [esp + 0x18]
mov ecx, 0xb
lea esi, [esp + 0x34]
mov edx, dword [esp + 0x24]
lea edi, [esp + eax + 0xa4]
mov byte [esp + eax + 0xd2], 0xfe
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov dword [esp + 0x18], edx
jmp 0x482037
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x481f38
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0x79c]
test ecx, ecx
jne 0x481eba
mov ecx, dword [esp + 0x18]
xor edx, edx
mov dword [esp + 0x4e], edx
mov eax, ecx
mov byte [esp + ecx + 0xd2], 0xff
mov dword [esp + 0x52], edx
jmp 0x48201b
cmp ecx, 0x1312d00
jbe 0x481ef4
mov edx, dword [esp + 0x28]
mov eax, 0x51eb851f
mul dword [edx + 8]
mov esi, edx
mov eax, ecx
shr esi, 5
xor edx, edx
div esi
cmp al, 0x64
jae 0x481f21
mov edx, dword [esp + 0x18]
and eax, 0xff
mov byte [esp + edx + 0xd2], al
mov eax, edx
jmp 0x48201b
lea eax, [ecx + ecx*4]
mov ecx, dword [esp + 0x28]
xor edx, edx
lea eax, [eax + eax*4]
shl eax, 2
div dword [ecx + 8]
cmp al, 0x64
jae 0x481f21
mov edx, dword [esp + 0x18]
and eax, 0xff
mov byte [esp + edx + 0xd2], al
mov eax, edx
jmp 0x48201b
mov edx, dword [esp + 0x18]
mov eax, 0x64
mov byte [esp + edx + 0xd2], al
mov eax, edx
jmp 0x48201b
mov ecx, dword [ebp + 0x120]
test ecx, ecx
jne 0x481f50
mov edx, dword [esp + 0x18]
mov byte [esp + edx + 0xd2], 0xff
jmp 0x481fa5
cmp ecx, 0x1312d00
jbe 0x481f79
mov eax, 0x51eb851f
mul dword [ebp + 0x2bc]
mov esi, edx
mov eax, ecx
shr esi, 5
xor edx, edx
div esi
cmp al, 0x64
jae 0x481f95
and eax, 0xff
jmp 0x481f9a
lea eax, [ecx + ecx*4]
xor edx, edx
lea eax, [eax + eax*4]
shl eax, 2
div dword [ebp + 0x2bc]
cmp al, 0x64
jae 0x481f95
and eax, 0xff
jmp 0x481f9a
mov eax, 0x64
mov ecx, dword [esp + 0x18]
mov byte [esp + ecx + 0xd2], al
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x62c]
mov ecx, 0xb
mov eax, dword [esp + 0x24]
lea edi, [esp + edx + 0xa4]
mov dword [esp + 0x18], eax
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x1c]
movsw word es:[edi], word [esi]
mov dx, word [ecx + 0x850]
and edx, 0x2000
test dx, dx
je 0x482037
mov eax, 0xcccccccd
push 0
mul dword [ecx + 0x788]
mov eax, dword [esp + 0x630]
mov ecx, dword [esp + 0x18]
shr edx, 4
push 0
push edx
mov edx, dword [esp + 0x63c]
push ebp
push edx
push eax
push 0x37
call fcn.00479630
jmp 0x482037
mov eax, dword [esp + 0x18]
mov byte [esp + eax + 0xd2], 0xfe
lea edi, [esp + eax + 0xa4]
mov ecx, 0xb
lea esi, [esp + 0x34]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x24]
movsw word es:[edi], word [esi]
mov dword [esp + 0x18], ecx
mov edi, dword [esp + 0x14]
lea edx, [esp + 0x10]
lea eax, [esp + 0x64]
push edx
mov edx, dword [esp + 0x30]
lea ecx, [esp + 0x38]
push eax
mov eax, dword [esp + 0x640]
push ecx
push edx
lea ecx, [esp + 0x7c]
push eax
push ecx
mov ecx, dword [edi + 0xc8]
call fcn.00488700
test eax, eax
jne 0x481570
cmp dword [esp + 0x648], 1
jne 0x4820af
mov ecx, 0xb
xor eax, eax
lea edi, [esp + 0x74]
mov edx, dword [esp + 0x18]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x63c]
mov esi, dword [esp + 0x630]
stosw word es:[edi], ax
lea eax, [esp + 0xa4]
push edx
push eax
push ecx
lea edx, [esp + 0x80]
push esi
push edx
jmp 0x4820d4
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x63c]
mov esi, dword [esp + 0x630]
lea ecx, [esp + 0xa4]
push eax
mov eax, dword [esp + 0x630]
push ecx
push edx
push esi
push eax
mov edi, dword [esp + 0x28]
mov ecx, dword [edi + 0x3c]
call fcn.0045f9b0
mov eax, dword [esp + 0x30]
cmp byte [eax], 0x4e
jne 0x482108
movsx ecx, byte [eax + 2]
imul ecx, dword [ebp + 0x10c]
mov edx, dword [esp + 0x62c]
push ecx
push ebp
push 0xc
push esi
push edx
mov ecx, edi
call fcn.0047d950
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x618
ret 0x20