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

Disassembly:
mov eax, 0x5d6c
call fcn.0040f3a0
mov eax, dword [0x410b54]
push ebx
xor ebx, ebx
push ebp
push esi
cmp eax, ebx
push edi
je 0x40981e
call fcn.00402280
mov ebp, dword [esp + 0x5d80]
mov dword [esp + 0x28], ebx
cmp word [ebp + 0x14], bx
je 0x40985a
mov eax, dword [ebp + 0x2b]
shl eax, 2
push eax
call fcn.0040eb80
mov dword [ebp + 0x23], eax
mov word [ebp + 6], bx
mov word [ebp + 4], bx
mov word [ebp + 8], bx
mov word [ebp + 0xa], bx
mov ebx, 1
add esp, 4
mov dword [esp + 0x28], ebx
mov edi, str._bsc_src_
or ecx, 0xffffffff
xor eax, eax
mov word [ebp + 0x14], 1
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x193c]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x410a24]
lea esi, [esp + 0x10]
push esi
push eax
mov edx, dword [ecx]
call dword [edx + 0xc]
test eax, eax
jne 0x4098b3
push 0x413bf0
push 0x5e5
call fcn.00401160
add esp, 8
mov edi, dword [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x193c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x14]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x410a28]
lea edx, [esp + 0x1940]
push edx
mov eax, dword [ecx]
call dword [eax + 0x2c]
test eax, eax
je 0x40a9ca
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
call dword [eax]
test eax, eax
jne 0x409923
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx]
call dword [edx + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5d6c
ret
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x6c]
mov esi, 0x99
push edx
lea edx, [esp + 0x74]
mov dword [esp + 0x70], esi
mov eax, dword [ecx]
xor edi, edi
push edx
push edi
call dword [eax + 4]
test eax, eax
jne 0x409959
mov eax, dword [0x410b5c]
push eax
push 0x5e1
call fcn.00401160
add esp, 8
mov ecx, dword [esp + 0x70]
mov eax, 3
cmp ecx, eax
jne 0x40996c
cmp dword [esp + 0x74], eax
je 0x409980
mov ecx, dword [0x410b5c]
push ecx
push 0x5eb
call fcn.00401160
add esp, 8
mov cl, byte [esp + 0x82]
mov eax, dword [esp + 0x83]
test cl, cl
je 0x4099d4
cmp ebx, edi
jne 0x4099d4
cmp ax, 0xffff
jne 0x4099a5
mov edx, dword [esp + 0x5d84]
jmp 0x4099bc
mov edi, dword [0x418218]
mov edx, eax
and edx, 0xffff
xor ebx, ebx
mov bl, byte [edx + edi]
xor edi, edi
mov edx, ebx
cmp edx, edi
je 0x4099d4
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
call dword [eax + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5d6c
ret
mov word [ebp + 0x21], ax
mov eax, dword [esp + 0x78]
mov byte [ebp + 0x20], cl
mov ecx, dword [esp + 0x14]
and eax, 0xffff
mov dword [esp + 0x5d78], esi
cmp eax, 0x200
mov dword [esp + 0x376c], ecx
mov dword [esp + 0x3774], eax
mov dword [esp + 0x3770], edi
jle 0x409a10
mov eax, 0x200
lea edx, [eax + eax*8]
lea eax, [eax + edx*2]
mov dword [esp + 0x10], eax
mov edx, dword [ecx]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x377c]
push eax
push esi
call dword [edx + 4]
test eax, eax
jne 0x409a45
mov ecx, dword [0x410b5c]
push ecx
push 0x5e1
call fcn.00401160
add esp, 8
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x14]
and eax, 0xffff
mov dword [esp + 0x112c], ecx
mov dword [esp + 0x1130], edi
lea edx, [eax + eax*8]
lea esi, [eax + edx*2 + 0x99]
mov eax, dword [esp + 0x7a]
and eax, 0xffff
mov dword [esp + 0x1938], esi
cmp eax, 0x200
mov dword [esp + 0x1134], eax
jle 0x409a8d
mov eax, 0x200
shl eax, 2
mov dword [esp + 0x10], eax
mov edx, dword [ecx]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x113c]
push eax
push esi
call dword [edx + 4]
test eax, eax
jne 0x409abf
mov ecx, dword [0x410b5c]
push ecx
push 0x5e1
call fcn.00401160
add esp, 8
mov edx, dword [esp + 0x7a]
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x14]
and edx, 0xffff
and eax, 0xffff
mov dword [esp + 0x1b3c], ecx
lea esi, [esi + edx*4]
cmp eax, 0x200
mov dword [esp + 0x2348], esi
mov dword [esp + 0x1b44], eax
mov dword [esp + 0x1b40], edi
jle 0x409b01
mov eax, 0x200
shl eax, 2
mov dword [esp + 0x10], eax
mov edx, dword [ecx]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x1b4c]
push eax
push esi
call dword [edx + 4]
test eax, eax
jne 0x409b33
mov ecx, dword [0x410b5c]
push ecx
push 0x5e1
call fcn.00401160
add esp, 8
mov edx, dword [esp + 0x7c]
mov eax, dword [esp + 0x7e]
mov ecx, dword [esp + 0x14]
and edx, 0xffff
and eax, 0xffff
mov dword [esp + 0x10c], ecx
lea esi, [esi + edx*4]
cmp eax, 0x200
mov dword [esp + 0x918], esi
mov dword [esp + 0x114], eax
mov dword [esp + 0x110], edi
jle 0x409b75
mov eax, 0x200
shl eax, 2
mov dword [esp + 0x10], eax
mov edx, dword [ecx]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x11c]
push eax
push esi
call dword [edx + 4]
test eax, eax
jne 0x409ba7
mov ecx, dword [0x410b5c]
push ecx
push 0x5e1
call fcn.00401160
add esp, 8
mov eax, dword [esp + 0x7e]
mov ecx, dword [esp + 0x14]
and eax, 0xffff
mov dword [esp + 0x91c], ecx
cmp eax, 0x200
mov dword [esp + 0x924], eax
lea esi, [esi + eax*4]
mov dword [esp + 0x920], edi
mov dword [esp + 0x1128], esi
jle 0x409bdf
mov eax, 0x200
lea edx, [eax*4]
mov dword [esp + 0x10], edx
mov eax, dword [ecx]
lea edx, [esp + 0x10]
push edx
lea edx, [esp + 0x92c]
push edx
push esi
call dword [eax + 4]
test eax, eax
jne 0x409c14
mov eax, dword [0x410b5c]
push eax
push 0x5e1
call fcn.00401160
add esp, 8
mov ecx, dword [esp + 0x7e]
mov eax, dword [esp + 0x80]
and ecx, 0xffff
and eax, 0xffff
cmp eax, 0x200
mov dword [esp + 0x2354], eax
lea esi, [esi + ecx*4]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x2d58], esi
mov dword [esp + 0x234c], ecx
mov dword [esp + 0x2350], edi
jle 0x409c59
mov eax, 0x200
lea edx, [eax + eax*4]
mov dword [esp + 0x10], edx
mov eax, dword [ecx]
lea edx, [esp + 0x10]
push edx
lea edx, [esp + 0x235c]
push edx
push esi
call dword [eax + 4]
test eax, eax
jne 0x409c8a
mov eax, dword [0x410b5c]
push eax
push 0x5e1
call fcn.00401160
add esp, 8
mov eax, dword [esp + 0x80]
mov dword [esp + 0x2d60], edi
and eax, 0xffff
mov edx, eax
mov dword [esp + 0x2d64], eax
lea ecx, [esi + eax*4]
add edx, ecx
mov ecx, dword [esp + 0x14]
cmp eax, 0x200
mov dword [esp + 0x3768], edx
mov dword [esp + 0x2d5c], ecx
jle 0x409cc9
mov eax, 0x200
lea esi, [esp + 0x10]
lea eax, [eax + eax*4]
push esi
lea esi, [esp + 0x2d6c]
mov dword [esp + 0x14], eax
mov eax, dword [ecx]
push esi
push edx
call dword [eax + 4]
test eax, eax
jne 0x409cfb
mov ecx, dword [0x410b5c]
push ecx
push 0x5e1
call fcn.00401160
add esp, 8
mov eax, dword [esp + 0x78]
mov edx, dword [0x413bd0]
and eax, 0xffff
mov dword [esp + 0x40], edx
shl eax, 2
push eax
mov dword [0x413bd0], ebp
call fcn.0040e2f0
mov ecx, dword [esp + 0x7c]
add esp, 4
xor ebp, ebp
cmp cx, di
mov dword [esp + 0x34], eax
jbe 0x409eab
mov dword [esp + 0x30], eax
mov esi, ebp
and esi, 0x800001ff
jns 0x409d49
dec esi
or esi, 0xfffffe00
inc esi
mov eax, dword [esp + 0x3770]
cmp ebp, eax
jl 0x409d5d
add eax, 0x200
cmp ebp, eax
jl 0x409dc9
mov ecx, dword [esp + 0x3774]
mov eax, ebp
sub eax, esi
sub ecx, eax
mov dword [esp + 0x3770], eax
cmp ecx, 0x200
jle 0x409d7e
mov ecx, 0x200
mov ebx, dword [esp + 0x5d78]
lea edi, [esp + 0x10]
lea edx, [ecx + ecx*8]
push edi
lea edi, [esp + 0x377c]
add ebx, eax
lea ecx, [ecx + edx*2]
push edi
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x3774]
lea edi, [eax + eax*8]
mov edx, dword [ecx]
lea eax, [ebx + edi*2]
push eax
call dword [edx + 4]
test eax, eax
jne 0x409dc9
mov ecx, dword [0x410b5c]
push ecx
push 0x5e1
call fcn.00401160
add esp, 8
lea edx, [esi + esi*8]
lea eax, [esp + edx*2 + 0x376c]
lea edx, [esp + 0x24]
push edx
mov edx, dword [eax + esi + 0xc]
lea eax, [eax + esi + 0xc]
sub esp, 8
mov ecx, eax
mov esi, dword [ecx]
mov di, word [ecx + 4]
mov bl, byte [ecx + 6]
mov ecx, esp
mov dword [ecx], edx
mov dx, word [eax + 4]
mov al, byte [eax + 6]
mov word [ecx + 4], dx
mov byte [ecx + 6], al
mov ecx, 0x412b90
call fcn.0040bbb0
test eax, eax
je 0x409e17
mov ecx, dword [esp + 0x24]
lea esi, [ecx + 4]
jmp 0x409e4a
push 0xf
call fcn.0040ea00
lea ecx, [eax + 4]
add esp, 4
mov edx, ecx
mov dword [edx], esi
mov esi, ecx
mov word [edx + 4], di
mov byte [edx + 6], bl
mov edx, dword [esp + 0x24]
mov edx, dword [edx]
mov dword [eax], edx
mov edx, dword [esp + 0x24]
mov dword [edx], eax
mov eax, dword [0x412b94]
inc eax
mov dword [0x412b94], eax
mov eax, dword [0x413bd0]
lea edx, [esp + 0x3c]
push edx
push esi
lea ecx, [eax + 0x23]
call fcn.0040bc30
test eax, eax
je 0x409e6a
mov eax, dword [esp + 0x3c]
mov edi, dword [eax + 8]
jmp 0x409e89
push 0x1a
call fcn.0040eb80
mov edi, eax
add esp, 4
mov dword [edi + 2], esi
mov ecx, dword [0x413bd0]
push edi
push esi
add ecx, 0x23
call fcn.0040b9e0
mov eax, dword [esp + 0x30]
inc ebp
mov dword [eax], edi
mov ecx, dword [esp + 0x78]
mov edx, ecx
add eax, 4
and edx, 0xffff
mov dword [esp + 0x30], eax
cmp ebp, edx
jb 0x409d37
mov edx, dword [esp + 0x40]
xor eax, eax
cmp cx, ax
mov dword [0x413bd0], edx
mov dword [esp + 0x44], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x30], eax
jbe 0x40a9a6
mov eax, dword [0x410b54]
test eax, eax
je 0x409eea
call fcn.00402280
mov edi, dword [esp + 0x30]
mov esi, edi
and esi, 0x800001ff
jns 0x409f00
dec esi
or esi, 0xfffffe00
inc esi
mov eax, dword [esp + 0x3770]
cmp edi, eax
jl 0x409f14
add eax, 0x200
cmp edi, eax
jl 0x409f81
mov ecx, dword [esp + 0x3774]
mov eax, edi
sub eax, esi
sub ecx, eax
mov dword [esp + 0x3770], eax
cmp ecx, 0x200
jle 0x409f35
mov ecx, 0x200
mov ebp, dword [esp + 0x5d78]
lea ebx, [esp + 0x1c]
lea edx, [ecx + ecx*8]
push ebx
lea ebx, [esp + 0x377c]
add ebp, eax
lea ecx, [ecx + edx*2]
push ebx
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x3774]
lea ebx, [eax + eax*8]
mov edx, dword [ecx]
lea eax, [ebp + ebx*2]
push eax
call dword [edx + 4]
test eax, eax
jne 0x409f81
mov ecx, dword [0x410b5c]
push ecx
push 0x5e1
call fcn.00401160
add esp, 8
mov ecx, dword [esp + 0x34]
lea edx, [esi + esi*8]
mov ebx, dword [esp + 0x44]
lea eax, [esp + edx*2 + 0x376c]
mov edx, dword [ecx + edi*4]
mov edi, dword [esp + 0x2c]
mov dword [esp + 0x18], edx
lea esi, [eax + esi + 0xc]
xor eax, eax
mov dword [esp + 0x1c], esi
mov ax, word [esi + 7]
cmp ebx, eax
jae 0x40a188
mov esi, ebx
and esi, 0x800001ff
jns 0x409fc6
dec esi
or esi, 0xfffffe00
inc esi
mov eax, dword [esp + 0x1130]
cmp ebx, eax
jl 0x409fda
add eax, 0x200
cmp ebx, eax
jl 0x40a03f
mov ecx, dword [esp + 0x1134]
mov eax, ebx
sub eax, esi
sub ecx, eax
mov dword [esp + 0x1130], eax
cmp ecx, 0x200
jle 0x409ffb
mov ecx, 0x200
lea ebp, [esp + 0x20]
push ebp
lea ebp, [esp + 0x113c]
shl ecx, 2
push ebp
mov ebp, dword [esp + 0x1940]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x1134]
lea eax, [ebp + eax*4]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test eax, eax
jne 0x40a03f
mov ecx, dword [0x410b5c]
push ecx
push 0x5e1
call fcn.00401160
add esp, 8
mov eax, dword [esp + 0x28]
lea ecx, [esp + esi*4 + 0x1138]
test eax, eax
jne 0x40a07f
mov ax, word [ecx + 2]
cmp ax, 0xffff
jne 0x40a061
mov eax, dword [esp + 0x5d84]
jmp 0x40a077
mov esi, dword [0x418218]
mov edi, dword [esp + 0x2c]
and eax, 0xffff
xor edx, edx
mov dl, byte [eax + esi]
mov eax, edx
test eax, eax
jne 0x40a171
mov edi, dword [esp + 0x18]
mov ax, word [ecx]
mov cx, word [ecx + 2]
mov word [esp + 0x48], ax
mov ebp, dword [edi + 0xa]
mov word [esp + 0x4a], cx
test ebp, ebp
je 0x40a0a7
mov ecx, dword [ebp]
cmp ecx, 0x14
jge 0x40a0ad
mov eax, ecx
jmp 0x40a0bd
xor ecx, ecx
mov eax, ecx
jmp 0x40a0bd
mov eax, ecx
mov esi, 5
cdq
idiv esi
mov eax, ecx
sub eax, edx
add eax, esi
lea esi, [ecx + 1]
cmp esi, eax
jge 0x40a0d6
mov edx, dword [esp + 0x48]
mov dword [ebp + esi*4], edx
mov eax, dword [edi + 0xa]
mov dword [eax], esi
jmp 0x40a162
test ebp, ebp
je 0x40a12a
cmp esi, 0x14
jge 0x40a0e3
mov edi, esi
jmp 0x40a0f4
mov eax, esi
mov edi, 5
cdq
idiv edi
mov edi, esi
sub edi, edx
add edi, 5
cmp ecx, 0x14
jl 0x40a10b
mov eax, ecx
mov ebx, 5
cdq
idiv ebx
sub ecx, edx
add ecx, ebx
mov ebx, dword [esp + 0x44]
lea edx, [edi*4 + 4]
lea eax, [ecx*4 + 4]
push edx
push eax
push ebp
call fcn.0040e7e0
mov edi, dword [esp + 0x24]
add esp, 0xc
jmp 0x40a14f
cmp esi, 0x14
mov eax, esi
jl 0x40a13f
cdq
mov ecx, 5
idiv ecx
mov eax, esi
sub eax, edx
add eax, ecx
lea edx, [eax*4 + 4]
push edx
call fcn.0040e700
add esp, 4
test eax, eax
je 0x40a162
mov ecx, dword [esp + 0x48]
mov dword [edi + 0xa], eax
mov dword [eax + esi*4], ecx
mov edx, dword [edi + 0xa]
mov dword [edx], esi
mov eax, dword [esp + 0x5d80]
mov edi, dword [esp + 0x2c]
inc word [eax + 6]
mov esi, dword [esp + 0x1c]
xor eax, eax
inc ebx
mov ax, word [esi + 7]
mov dword [esp + 0x44], ebx
cmp ebx, eax
jb 0x409fb4
xor ecx, ecx
mov cx, word [esi + 9]
cmp edi, ecx
jae 0x40a365
mov esi, edi
and esi, 0x800001ff
jns 0x40a1a8
dec esi
or esi, 0xfffffe00
inc esi
mov eax, dword [esp + 0x1b40]
cmp edi, eax
jl 0x40a1bc
add eax, 0x200
cmp edi, eax
jl 0x40a224
mov ecx, dword [esp + 0x1b44]
mov eax, edi
sub eax, esi
sub ecx, eax
mov dword [esp + 0x1b40], eax
cmp ecx, 0x200
jle 0x40a1dd
mov ecx, 0x200
lea ebx, [esp + 0x20]
lea edx, [ecx*4]
mov ecx, dword [esp + 0x1b3c]
push ebx
lea ebx, [esp + 0x1b4c]
mov dword [esp + 0x24], edx
mov edx, dword [ecx]
push ebx
mov ebx, dword [esp + 0x2350]
lea eax, [ebx + eax*4]
push eax
call dword [edx + 4]
test eax, eax
jne 0x40a224
mov ecx, dword [0x410b5c]
push ecx
push 0x5e1
call fcn.00401160
add esp, 8
mov eax, dword [esp + 0x28]
lea ecx, [esp + esi*4 + 0x1b48]
test eax, eax
jne 0x40a260
mov ax, word [ecx + 2]
cmp ax, 0xffff
jne 0x40a246
mov eax, dword [esp + 0x5d84]
jmp 0x40a258
mov esi, dword [0x418218]
and eax, 0xffff
xor edx, edx
mov dl, byte [eax + esi]
mov eax, edx
test eax, eax
jne 0x40a34e
mov ebx, dword [esp + 0x18]
mov ax, word [ecx]
mov cx, word [ecx + 2]
mov word [esp + 0x40], ax
mov ebp, dword [ebx + 0xe]
mov word [esp + 0x42], cx
test ebp, ebp
je 0x40a288
mov ecx, dword [ebp]
cmp ecx, 0x14
jge 0x40a28e
mov eax, ecx
jmp 0x40a29e
xor ecx, ecx
mov eax, ecx
jmp 0x40a29e
mov eax, ecx
mov esi, 5
cdq
idiv esi
mov eax, ecx
sub eax, edx
add eax, esi
lea esi, [ecx + 1]
cmp esi, eax
jge 0x40a2b7
mov edx, dword [esp + 0x40]
mov dword [ebp + esi*4], edx
mov eax, dword [ebx + 0xe]
mov dword [eax], esi
jmp 0x40a33f
test ebp, ebp
je 0x40a307
cmp esi, 0x14
jge 0x40a2c4
mov edi, esi
jmp 0x40a2d5
mov eax, esi
mov edi, 5
cdq
idiv edi
mov edi, esi
sub edi, edx
add edi, 5
cmp ecx, 0x14
jl 0x40a2ec
mov eax, ecx
mov ebx, 5
cdq
idiv ebx
sub ecx, edx
add ecx, ebx
mov ebx, dword [esp + 0x18]
lea edx, [edi*4 + 4]
lea eax, [ecx*4 + 4]
push edx
push eax
push ebp
call fcn.0040e660
add esp, 0xc
jmp 0x40a32c
cmp esi, 0x14
mov eax, esi
jl 0x40a31c
cdq
mov ecx, 5
idiv ecx
mov eax, esi
sub eax, edx
add eax, ecx
lea edx, [eax*4 + 4]
push edx
call fcn.0040e580
add esp, 4
test eax, eax
je 0x40a33f
mov ecx, dword [esp + 0x40]
mov dword [ebx + 0xe], eax
mov dword [eax + esi*4], ecx
mov edx, dword [ebx + 0xe]
mov dword [edx], esi
mov eax, dword [esp + 0x5d80]
mov edi, dword [esp + 0x2c]
inc word [eax + 4]
mov esi, dword [esp + 0x1c]
xor eax, eax
inc edi
mov ax, word [esi + 9]
mov dword [esp + 0x2c], edi
cmp edi, eax
jb 0x40a196
mov eax, dword [esp + 0x3c]
xor ecx, ecx
mov cx, word [esi + 0xb]
cmp eax, ecx
jae 0x40a56a
mov esi, eax
and esi, 0x800001ff
jns 0x40a389
dec esi
or esi, 0xfffffe00
inc esi
mov ecx, dword [esp + 0x110]
cmp eax, ecx
jl 0x40a39e
add ecx, 0x200
cmp eax, ecx
jl 0x40a404
mov ecx, dword [esp + 0x114]
sub eax, esi
sub ecx, eax
mov dword [esp + 0x110], eax
cmp ecx, 0x200
jle 0x40a3bd
mov ecx, 0x200
lea edi, [esp + 0x20]
lea edx, [ecx*4]
mov ecx, dword [esp + 0x10c]
push edi
lea edi, [esp + 0x11c]
mov dword [esp + 0x24], edx
mov edx, dword [ecx]
push edi
mov edi, dword [esp + 0x920]
lea eax, [edi + eax*4]
push eax
call dword [edx + 4]
test eax, eax
jne 0x40a404
mov ecx, dword [0x410b5c]
push ecx
push 0x5e1
call fcn.00401160
add esp, 8
mov eax, dword [esp + 0x28]
lea ecx, [esp + esi*4 + 0x118]
test eax, eax
jne 0x40a440
mov ax, word [ecx + 2]
cmp ax, 0xffff
jne 0x40a426
mov eax, dword [esp + 0x5d84]
jmp 0x40a438
mov esi, dword [0x418218]
and eax, 0xffff
xor edx, edx
mov dl, byte [eax + esi]
mov eax, edx
test eax, eax
jne 0x40a54f
mov edx, dword [esp + 0x34]
xor eax, eax
mov ax, word [ecx]
mov ebx, dword [edx + eax*4]
mov ax, word [ecx + 2]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x4c], ebx
mov word [esp + 0x50], ax
mov ebp, dword [ecx + 0x12]
test ebp, ebp
je 0x40a470
mov esi, dword [ebp]
cmp esi, 0x14
jge 0x40a476
mov eax, esi
jmp 0x40a486
xor esi, esi
mov eax, esi
jmp 0x40a486
mov eax, esi
mov ecx, 5
cdq
idiv ecx
mov eax, esi
sub eax, edx
add eax, ecx
lea edi, [esi + 1]
cmp edi, eax
jge 0x40a4ab
mov cx, word [esp + 0x50]
lea edx, [esi + esi*2]
lea eax, [ebp + edx*2 + 4]
mov edx, dword [esp + 0x18]
mov dword [eax], ebx
mov word [eax + 4], cx
mov eax, dword [edx + 0x12]
jmp 0x40a542
test ebp, ebp
je 0x40a4fd
cmp edi, 0x14
jge 0x40a4b8
mov ecx, edi
jmp 0x40a4c9
mov eax, edi
mov ecx, 5
cdq
idiv ecx
mov ecx, edi
sub ecx, edx
add ecx, 5
cmp esi, 0x14
mov eax, esi
jl 0x40a4e2
cdq
mov ebx, 5
idiv ebx
mov eax, esi
sub eax, edx
add eax, ebx
mov ebx, dword [esp + 0x4c]
lea edx, [ecx + ecx*2]
lea ecx, [edx + edx + 4]
lea edx, [eax + eax*2]
push ecx
lea eax, [edx + edx + 4]
push eax
push ebp
call fcn.0040e4e0
add esp, 0xc
jmp 0x40a522
cmp edi, 0x14
mov eax, edi
jl 0x40a512
cdq
mov ecx, 5
idiv ecx
mov eax, edi
sub eax, edx
add eax, ecx
lea edx, [eax + eax*2]
lea eax, [edx + edx + 4]
push eax
call fcn.0040e400
add esp, 4
test eax, eax
je 0x40a544
mov ecx, dword [esp + 0x18]
lea edx, [esi + esi*2]
mov dword [ecx + 0x12], eax
lea eax, [eax + edx*2 + 4]
mov dx, word [esp + 0x50]
mov dword [eax], ebx
mov word [eax + 4], dx
mov eax, dword [ecx + 0x12]
mov dword [eax], edi
mov eax, dword [esp + 0x5d80]
inc word [eax + 8]
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x3c]
xor ecx, ecx
inc eax
mov cx, word [esi + 0xb]
mov dword [esp + 0x3c], eax
cmp eax, ecx
jb 0x40a377
mov eax, dword [esp + 0x38]
xor edx, edx
mov dx, word [esi + 0xd]
cmp eax, edx
jae 0x40a762
mov eax, dword [esp + 0x38]
mov esi, eax
and esi, 0x800001ff
jns 0x40a592
dec esi
or esi, 0xfffffe00
inc esi
mov ecx, dword [esp + 0x920]
cmp eax, ecx
jl 0x40a5a7
add ecx, 0x200
cmp eax, ecx
jl 0x40a609
mov ecx, dword [esp + 0x924]
sub eax, esi
sub ecx, eax
mov dword [esp + 0x920], eax
cmp ecx, 0x200
jle 0x40a5c6
mov ecx, 0x200
lea edi, [esp + 0x20]
push edi
lea edi, [esp + 0x92c]
shl ecx, 2
push edi
mov edi, dword [esp + 0x1130]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x924]
lea eax, [edi + eax*4]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test eax, eax
jne 0x40a609
mov ecx, dword [0x410b5c]
push ecx
push 0x5e1
call fcn.00401160
add esp, 8
mov eax, dword [esp + 0x28]
lea ecx, [esp + esi*4 + 0x928]
test eax, eax
jne 0x40a645
mov ax, word [ecx + 2]
cmp ax, 0xffff
jne 0x40a62b
mov eax, dword [esp + 0x5d84]
jmp 0x40a63d
mov esi, dword [0x418218]
and eax, 0xffff
xor edx, edx
mov dl, byte [eax + esi]
mov eax, edx
test eax, eax
jne 0x40a747
mov edx, dword [esp + 0x34]
mov ebp, dword [esp + 0x18]
xor eax, eax
mov ax, word [ecx]
mov ebx, dword [edx + eax*4]
mov ax, word [ecx + 2]
mov ecx, dword [ebp + 0x16]
mov dword [esp + 0x54], ebx
test ecx, ecx
mov word [esp + 0x58], ax
je 0x40a674
mov esi, dword [ecx]
cmp esi, 0x14
jge 0x40a67a
mov eax, esi
jmp 0x40a68a
xor esi, esi
mov eax, esi
jmp 0x40a68a
mov eax, esi
mov edi, 5
cdq
idiv edi
mov eax, esi
sub eax, edx
add eax, edi
lea edi, [esi + 1]
cmp edi, eax
jge 0x40a6ad
lea edx, [esi + esi*2]
lea eax, [ecx + edx*2 + 4]
mov cx, word [esp + 0x58]
mov dword [eax], ebx
mov word [eax + 4], cx
mov edx, dword [ebp + 0x16]
mov dword [edx], edi
jmp 0x40a747
test ecx, ecx
je 0x40a704
cmp edi, 0x14
jge 0x40a6ba
mov ebp, edi
jmp 0x40a6cb
mov eax, edi
mov ebp, 5
cdq
idiv ebp
mov ebp, edi
sub ebp, edx
add ebp, 5
cmp esi, 0x14
mov eax, esi
jl 0x40a6e4
cdq
mov ebx, 5
idiv ebx
mov eax, esi
sub eax, edx
add eax, ebx
mov ebx, dword [esp + 0x54]
lea edx, [ebp + ebp*2]
lea eax, [eax + eax*2]
lea edx, [edx + edx + 4]
push edx
lea edx, [eax + eax + 4]
push edx
push ecx
call fcn.0040e4e0
mov ebp, dword [esp + 0x24]
add esp, 0xc
jmp 0x40a729
cmp edi, 0x14
mov eax, edi
jl 0x40a719
cdq
mov ecx, 5
idiv ecx
mov eax, edi
sub eax, edx
add eax, ecx
lea edx, [eax + eax*2]
lea eax, [edx + edx + 4]
push eax
call fcn.0040e400
add esp, 4
test eax, eax
je 0x40a747
lea ecx, [esi + esi*2]
mov dword [ebp + 0x16], eax
lea edx, [eax + ecx*2 + 4]
mov ax, word [esp + 0x58]
mov dword [edx], ebx
mov word [edx + 4], ax
mov ecx, dword [ebp + 0x16]
mov dword [ecx], edi
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x38]
xor edx, edx
inc eax
mov dx, word [ecx + 0xd]
mov dword [esp + 0x38], eax
cmp eax, edx
jb 0x40a57c
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x24]
xor edx, edx
mov dx, word [eax + 0xf]
cmp ebx, edx
jae 0x40a8c1
mov edi, dword [esp + 0x5d80]
mov ebp, dword [esp + 0x18]
mov esi, ebx
and esi, 0x800001ff
jns 0x40a795
dec esi
or esi, 0xfffffe00
inc esi
mov eax, dword [esp + 0x2350]
cmp ebx, eax
jl 0x40a7a9
add eax, 0x200
cmp ebx, eax
jl 0x40a812
mov ecx, dword [esp + 0x2354]
mov eax, ebx
sub eax, esi
sub ecx, eax
mov dword [esp + 0x2350], eax
cmp ecx, 0x200
jle 0x40a7ca
mov ecx, 0x200
lea ebx, [esp + 0x20]
lea ecx, [ecx + ecx*4]
push ebx
lea ebx, [esp + 0x235c]
push ebx
mov ebx, dword [esp + 0x2d60]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x2354]
lea ebx, [ebx + eax*4]
mov edx, dword [ecx]
add eax, ebx
push eax
call dword [edx + 4]
test eax, eax
jne 0x40a80e
mov eax, dword [0x410b5c]
push eax
push 0x5e1
call fcn.00401160
add esp, 8
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
lea ecx, [esp + esi + 0x234c]
test eax, eax
lea ecx, [ecx + esi*4 + 0xc]
jne 0x40a84e
mov ax, word [ecx + 3]
cmp ax, 0xffff
jne 0x40a838
mov eax, dword [esp + 0x5d84]
jmp 0x40a84a
mov esi, dword [0x418218]
and eax, 0xffff
xor edx, edx
mov dl, byte [eax + esi]
mov eax, edx
test eax, eax
jne 0x40a8a8
mov ax, word [ecx + 3]
mov dl, byte [ecx + 2]
push eax
xor eax, eax
mov ax, word [ecx]
mov ecx, dword [esp + 0x38]
push edx
mov edx, dword [ecx + eax*4]
lea ecx, [esp + 0x6c]
push edx
call fcn.0040b4a0
mov eax, dword [ebp + 6]
test eax, eax
jne 0x40a881
push 8
call fcn.0040e400
add esp, 4
mov dword [ebp + 6], eax
mov ecx, dword [esp + 0x64]
mov dx, word [esp + 0x68]
sub esp, 8
mov eax, esp
mov dword [eax], ecx
mov cl, byte [esp + 0x72]
mov word [eax + 4], dx
mov byte [eax + 6], cl
mov ecx, dword [ebp + 6]
call fcn.0040b4c0
inc word [edi + 0xa]
mov eax, dword [esp + 0x1c]
xor edx, edx
inc ebx
mov dx, word [eax + 0xf]
mov dword [esp + 0x24], ebx
cmp ebx, edx
jb 0x40a783
jmp 0x40a8c5
mov ebp, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x10]
xor ecx, ecx
mov cx, word [edx + 0x11]
cmp esi, ecx
jae 0x40a98b
mov edi, dword [esp + 0x34]
push esi
lea ecx, [esp + 0x2d60]
call fcn.0040b840
mov ecx, dword [esp + 0x28]
test ecx, ecx
jne 0x40a91f
mov cx, word [eax + 3]
cmp cx, 0xffff
jne 0x40a908
mov ecx, dword [esp + 0x5d84]
jmp 0x40a91b
mov ebx, dword [0x418218]
and ecx, 0xffff
xor edx, edx
mov dl, byte [ecx + ebx]
mov ecx, edx
test ecx, ecx
jne 0x40a974
mov cx, word [eax + 3]
mov dl, byte [eax + 2]
push ecx
xor ecx, ecx
mov cx, word [eax]
push edx
mov edx, dword [edi + ecx*4]
lea ecx, [esp + 0x64]
push edx
call fcn.0040b4a0
mov eax, dword [ebp + 6]
test eax, eax
jne 0x40a94e
push 8
call fcn.0040e400
add esp, 4
mov dword [ebp + 6], eax
mov ecx, dword [esp + 0x5c]
mov dx, word [esp + 0x60]
sub esp, 8
mov eax, esp
mov dword [eax], ecx
mov cl, byte [esp + 0x6a]
mov word [eax + 4], dx
mov byte [eax + 6], cl
mov ecx, dword [ebp + 6]
add ecx, 4
call fcn.0040b4c0
mov eax, dword [esp + 0x1c]
xor edx, edx
inc esi
mov dx, word [eax + 0x11]
mov dword [esp + 0x10], esi
cmp esi, edx
jb 0x40a8df
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x78]
inc eax
and ecx, 0xffff
cmp eax, ecx
mov dword [esp + 0x30], eax
jb 0x409edc
mov edx, dword [esp + 0x34]
push edx
call fcn.0040e320
mov ecx, dword [esp + 0x18]
add esp, 4
mov eax, dword [ecx]
call dword [eax + 0x18]
mov eax, dword [0x410b54]
test eax, eax
je 0x40a9ca
call fcn.00402280
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5d6c
ret