Function at 0x40d180
Capabilities:
Check for time delay via gettickcount
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x48acab
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x498
push ebx
mov ebx, ecx
push ebp
push esi
mov byte [0x49c274], 2
mov al, byte [ebx + 0x34]
push edi
xor edi, edi
xor ebp, ebp
mov dword [esp + 0x28], ebx
test al, al
mov dword [esp + 0x44], edi
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x48], edi
mov dword [esp + 0x3c], edi
mov esi, 1
jne 0x40d1ed
push str.CANPRINT
push esi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov ebp, eax
cmp ebp, edi
mov dword [esp + 0x2c], ebp
je 0x40d1ed
push 0xffffffffffffffff
push ebp
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov al, byte [ebx + 4]
test al, al
jne 0x40d206
mov edi, dword [ebx + 0x14]
mov ecx, 0x19
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 0x14]
mov dword [ebx + 0x1c], eax
lea ecx, [esp + 0x4c]
call fcn.00410af0
mov eax, dword [ebx + 0xc]
mov edi, dword [esp + 0x4bc]
cmp eax, esi
mov dword [esp + 0x4b0], esi
je 0x40d5c3
mov ecx, dword [ebx + 0x1c]
mov al, byte [esp + 0x4c0]
test al, al
mov byte [ecx], 2
mov edx, dword [ebx + 0x1c]
mov byte [edx + 1], 8
je 0x40d249
mov eax, dword [ebx + 0x1c]
mov byte [eax + 2], 0xff
jmp 0x40d250
mov ecx, dword [ebx + 0x1c]
mov byte [ecx + 2], 0
mov ecx, edi
call fcn.00410450
mov edx, dword [ebx + 0x1c]
push 0xffff
mov ecx, edi
mov byte [edx + 3], al
mov eax, dword [ebx + 0x1c]
add eax, 4
push eax
mov dword [ebx + 0x1c], eax
call fcn.00410470
mov cl, byte [ebx + 4]
lea esi, [eax + 4]
test cl, cl
je 0x40d592
mov ecx, dword [ebx + 0x1c]
lea edx, [esp + 0x3c]
add ecx, eax
push edx
mov dword [ebx + 0x1c], ecx
mov eax, dword [ebx + 0x28]
lea ecx, [ebx + 0x20]
push 1
push eax
mov dword [esp + 0x4c], edi
mov dword [esp + 0x48], 2
call fcn.0040fa90
test ebp, ebp
je 0x40d2c1
lea eax, [esp + 0x70]
push eax
push 1
push ebp
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.0041a020
test al, al
je 0x40d52d
mov ecx, dword [ebx + 0x10]
test ecx, ecx
je 0x40d52d
call fcn.0044b050
test eax, eax
je 0x40d52d
mov cl, byte [esp + 0x27]
push 0
mov byte [esp + 0x18], cl
lea ecx, [esp + 0x18]
call fcn.004024d0
mov edi, 0x4a643c
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x18]
push ebp
call fcn.00402900
test al, al
je 0x40d33f
mov edi, dword [esp + 0x18]
mov ecx, ebp
mov edx, ecx
mov esi, 0x4a643c
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], ebp
mov byte [eax + ebp], 0
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0xa9]
mov byte [esp + 0xa8], 0
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x4bc]
mov byte [esp + 0x4b0], 2
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [esp + 0x34], 0
call fcn.00410450
test ax, ax
jle 0x40d500
mov ecx, dword [esp + 0x34]
lea edx, [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x4c0]
push edx
call fcn.004103a0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x4b4], 3
call fcn.00404130
lea ecx, [esp + 0x2c]
mov byte [esp + 0x4b0], 5
call fcn.00404260
lea ecx, [esp + 0x10]
call fcn.00404490
lea ecx, [esp + 0x10]
mov ebp, eax
xor esi, esi
call fcn.00404470
test ax, ax
jle 0x40d402
lea edi, [esp + 0xa8]
xor eax, eax
mov al, byte [esi + ebp]
push eax
push 0x49cd58
push edi
call fcn.0047edef
add esp, 0xc
lea ecx, [esp + 0x10]
inc esi
add edi, 3
call fcn.00404470
movsx ecx, ax
cmp esi, ecx
jl 0x40d3da
mov edi, str.Req:
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x18]
push ebp
call fcn.00402900
test al, al
je 0x40d448
mov edi, dword [esp + 0x18]
mov ecx, ebp
mov edx, ecx
mov esi, str.Req:
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], ebp
mov byte [eax + ebp], 0
lea edi, [esp + 0xa8]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
mov ecx, dword [0x49014c]
sub ecx, edx
cmp ecx, esi
ja 0x40d470
call fcn.0047e19b
test esi, esi
jbe 0x40d4b7
mov edx, dword [esp + 0x1c]
push 0
lea ecx, [esp + 0x18]
lea ebp, [edx + esi]
push ebp
call fcn.00402900
test al, al
je 0x40d4b7
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
push ebp
lea edi, [ecx + eax]
mov ecx, esi
mov edx, ecx
lea esi, [esp + 0xac]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x18]
call fcn.004028e0
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x40d4c4
mov eax, 0x490148
mov ecx, dword [ebx + 0x10]
push 0
push eax
call fcn.00418a80
lea ecx, [esp + 0x10]
mov byte [esp + 0x4b0], 2
call fcn.00404260
mov esi, dword [esp + 0x34]
mov ecx, dword [esp + 0x4bc]
inc esi
mov dword [esp + 0x34], esi
call fcn.00410450
movsx eax, ax
cmp esi, eax
jl 0x40d37f
mov eax, dword [esp + 0x18]
mov byte [esp + 0x4b0], 1
test eax, eax
je 0x40d52d
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x40d524
cmp al, 0xff
je 0x40d524
dec al
mov byte [ecx], al
jmp 0x40d52d
push ecx
call fcn.0047e190
add esp, 4
mov esi, dword [esp + 0x4b8]
mov cl, byte [esp + 0x4c]
mov byte [esi], cl
lea ecx, [esp + 0x4c]
call fcn.00429bd0
test eax, eax
jge 0x40d549
xor eax, eax
shl eax, 4
push eax
call fcn.0047e9c2
mov edx, dword [esp + 0x58]
add esp, 4
mov dword [esi + 4], eax
mov ecx, esi
push eax
mov eax, dword [esp + 0x54]
push edx
push eax
call fcn.0040f5e0
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
lea ecx, [esp + 0x5c]
mov byte [esp + 0x4b0], 6
push ecx
lea ecx, [esi + 0x10]
call fcn.00405830
mov dword [esp + 0x44], 1
jmp 0x40d6f0
call fcn.0041a020
test al, al
je 0x40d5a5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x48], eax
mov edx, dword [ebx + 0x14]
mov ecx, dword [ebx]
push esi
push edx
call fcn.0041dcd0
mov al, byte [esp + 0x4c0]
test al, al
je 0x40d5c3
mov dword [ebx + 0xc], 1
mov edi, dword [ebx + 0x18]
mov ecx, 0x19
xor eax, eax
push 0xffff
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 0x18]
mov ecx, dword [ebx]
push eax
call fcn.0041df00
mov esi, eax
call fcn.0041a020
test al, al
je 0x40d5f4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x3c], eax
test esi, esi
jne 0x40d663
test ebp, ebp
je 0x40d611
lea ecx, [esp + 0x70]
push ecx
push 1
push ebp
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x4b8]
mov dl, byte [esp + 0x4c]
lea ecx, [esp + 0x4c]
mov byte [esi], dl
call fcn.00429bd0
test eax, eax
jge 0x40d62d
xor eax, eax
shl eax, 4
push eax
call fcn.0047e9c2
mov ecx, dword [esp + 0x54]
add esp, 4
mov dword [esi + 4], eax
push eax
mov eax, dword [esp + 0x58]
push eax
push ecx
mov ecx, esi
call fcn.0040f5e0
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
lea edx, [esp + 0x5c]
mov byte [esp + 0x4b0], 7
push edx
jmp 0x40d6e0
mov esi, dword [ebx + 0x18]
add esi, 8
movzx ax, byte [esi]
inc esi
test ax, ax
jne 0x40d708
test ebp, ebp
je 0x40d690
lea eax, [esp + 0x70]
push eax
push 1
push ebp
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x4b8]
mov cl, byte [esp + 0x4c]
mov byte [esi], cl
lea ecx, [esp + 0x4c]
call fcn.00429bd0
test eax, eax
jge 0x40d6ac
xor eax, eax
shl eax, 4
push eax
call fcn.0047e9c2
mov edx, dword [esp + 0x58]
add esp, 4
mov dword [esi + 4], eax
mov ecx, esi
push eax
mov eax, dword [esp + 0x54]
push edx
push eax
call fcn.0040f5e0
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
lea ecx, [esp + 0x5c]
mov byte [esp + 0x4b0], 8
push ecx
lea ecx, [esi + 0x10]
call fcn.00405830
mov dword [esp + 0x44], 1
lea ecx, [esp + 0x4c]
mov byte [esp + 0x4b0], 0
call fcn.00410bf0
mov eax, esi
jmp 0x40de8b
movsx eax, ax
test eax, eax
jle 0x40d814
mov dword [esp + 0x10], eax
movzx di, byte [esi]
lea ecx, [esp + 0x34]
inc esi
call fcn.00404120
mov dl, byte [esp + 0x27]
xor ebp, ebp
mov byte [esp + 0x14], dl
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
movsx ebx, di
test ebx, ebx
mov byte [esp + 0x4b0], 0xa
jle 0x40d7b7
movzx di, byte [esi]
inc esi
cmp di, 0xff
jne 0x40d767
movzx di, byte [esi]
movzx ax, byte [esi + 1]
shl edi, 8
add edi, eax
add esi, 2
test di, di
je 0x40d796
push edi
push esi
lea ecx, [esp + 0x3c]
call fcn.00404550
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x34]
push ecx
push 1
push edx
lea ecx, [esp + 0x20]
call fcn.004010c0
movsx eax, di
add esi, eax
inc ebp
cmp ebp, ebx
jl 0x40d74a
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40d7b7
mov ecx, dword [esp + 0x1c]
sub ecx, eax
sar ecx, 2
je 0x40d7b7
lea edx, [esp + 0x14]
lea ecx, [esp + 0x4c]
push edx
call fcn.00410e60
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
cmp edi, ebx
mov byte [esp + 0x4b0], 9
je 0x40d7d9
mov ecx, edi
call fcn.00404260
add edi, 4
cmp edi, ebx
jne 0x40d7cb
mov eax, dword [esp + 0x18]
push eax
call fcn.0047e190
xor eax, eax
add esp, 4
lea ecx, [esp + 0x34]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov byte [esp + 0x4b0], 1
call fcn.00404260
mov eax, dword [esp + 0x10]
dec eax
mov dword [esp + 0x10], eax
jne 0x40d717
mov esi, dword [esp + 0x2c]
test esi, esi
je 0x40d831
lea ecx, [esp + 0x70]
push ecx
push 1
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x4bc]
lea edx, [esp + 0x4c]
push edx
push eax
call fcn.00403bd0
add esp, 8
call fcn.0041a020
test al, al
je 0x40dcf4
mov ecx, dword [esp + 0x28]
mov ecx, dword [ecx + 0x10]
test ecx, ecx
je 0x40dcf4
call fcn.0044b050
test eax, eax
je 0x40dcf4
mov edi, 0x4a643c
or ecx, 0xffffffff
xor eax, eax
xor ebx, ebx
repne scasb al, byte es:[edi]
mov dl, byte [esp + 0x27]
mov dword [esp + 0x18], ebx
not ecx
dec ecx
mov byte [esp + 0x14], dl
push ecx
push 0x4a643c
lea ecx, [esp + 0x1c]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
call fcn.00402840
lea ecx, [esp + 0x10]
mov byte [esp + 0x4b0], 0xb
call fcn.00404120
mov ecx, dword [esp + 0x4bc]
mov byte [esp + 0x4b0], 0xc
mov byte [esp + 0xa8], bl
call fcn.00410450
test ax, ax
jle 0x40da8c
mov ecx, dword [esp + 0x4bc]
lea eax, [esp + 0x34]
push ebx
push eax
call fcn.004103a0
push ecx
mov byte [esp + 0x4b4], 0xd
mov ecx, esp
mov dword [esp + 0x30], esp
push eax
call fcn.00404130
lea ecx, [esp + 0x14]
call fcn.004042d0
lea ecx, [esp + 0x34]
mov byte [esp + 0x4b0], 0xc
call fcn.00404260
lea ecx, [esp + 0x10]
call fcn.00404490
lea ecx, [esp + 0x10]
mov ebp, eax
xor esi, esi
call fcn.00404470
test ax, ax
jle 0x40d963
lea edi, [esp + 0xa8]
xor ecx, ecx
mov cl, byte [esi + ebp]
push ecx
push str._.2X
push edi
call fcn.0047edef
add esp, 0xc
lea ecx, [esp + 0x10]
inc esi
add edi, 3
call fcn.00404470
movsx edx, ax
cmp esi, edx
jl 0x40d93b
mov eax, dword [esp + 0x48]
lea ecx, [esp + 0x74]
push eax
push str._ld_Req:
push ecx
call fcn.0047edef
lea edi, [esp + 0x80]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
mov edx, dword [0x49014c]
not ecx
dec ecx
mov esi, ecx
mov ecx, dword [esp + 0x1c]
sub edx, ecx
cmp edx, esi
ja 0x40d9a2
call fcn.0047e19b
test esi, esi
jbe 0x40d9e8
mov eax, dword [esp + 0x1c]
push 0
lea ecx, [esp + 0x18]
lea ebp, [eax + esi]
push ebp
call fcn.00402900
test al, al
je 0x40d9e8
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
lea edi, [edx + ecx]
mov ecx, esi
mov eax, ecx
lea esi, [esp + 0x74]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x1c], ebp
mov byte [ecx + ebp], 0
lea edi, [esp + 0xa8]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x1c]
repne scasb al, byte es:[edi]
mov eax, dword [0x49014c]
not ecx
dec ecx
sub eax, edx
mov esi, ecx
cmp eax, esi
ja 0x40da0f
call fcn.0047e19b
test esi, esi
jbe 0x40da58
mov edx, dword [esp + 0x1c]
push 0
lea ecx, [esp + 0x18]
lea ebp, [edx + esi]
push ebp
call fcn.00402900
test al, al
je 0x40da58
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
lea edi, [ecx + eax]
mov ecx, esi
mov edx, ecx
lea esi, [esp + 0xa8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], ebp
mov byte [eax + ebp], 0
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x40da65
mov eax, 0x490148
mov ecx, dword [esp + 0x28]
push 0
push eax
mov ecx, dword [ecx + 0x10]
call fcn.00418a80
mov ecx, dword [esp + 0x4bc]
inc ebx
call fcn.00410450
movsx edx, ax
cmp ebx, edx
jl 0x40d8d8
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0xa8]
push 1
rep stosd dword es:[edi], eax
mov ecx, 0xc
lea edi, [esp + 0x78]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edi, 0x4a643c
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x18]
push ebp
call fcn.00402900
test al, al
je 0x40daef
mov edi, dword [esp + 0x18]
mov ecx, ebp
mov eax, ecx
mov esi, 0x4a643c
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x1c], ebp
mov byte [ecx + ebp], 0
lea ecx, [esp + 0x4c]
mov dword [esp + 0x2c], 0
call fcn.004110d0
test ax, ax
jle 0x40dcb6
xor ebx, ebx
mov esi, dword [esp + 0x2c]
lea ecx, [esp + 0x4c]
push esi
call fcn.004110c0
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x40dc9d
mov edx, dword [eax + 8]
sub edx, ecx
sar edx, 2
cmp ebx, edx
jae 0x40dc9d
push ebx
push esi
lea ecx, [esp + 0x54]
call fcn.004110c0
mov ecx, eax
call fcn.004010b0
push ecx
mov ecx, esp
mov dword [esp + 0x38], esp
push eax
call fcn.00404130
lea ecx, [esp + 0x14]
call fcn.004042d0
lea ecx, [esp + 0x10]
call fcn.00404490
lea ecx, [esp + 0x10]
mov ebp, eax
xor esi, esi
call fcn.00404470
test ax, ax
jle 0x40dba6
lea edi, [esp + 0xa8]
xor eax, eax
mov al, byte [esi + ebp]
push eax
push str._.2X
push edi
call fcn.0047edef
add esp, 0xc
lea ecx, [esp + 0x10]
inc esi
add edi, 3
call fcn.00404470
movsx ecx, ax
cmp esi, ecx
jl 0x40db7e
mov edx, dword [esp + 0x3c]
mov edi, dword [esp + 0x48]
sub edx, edi
lea eax, [esp + 0x74]
push edx
push str._ld_Ans:
push eax
call fcn.0047edef
lea edi, [esp + 0x80]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov ebp, ecx
lea ecx, [esp + 0x18]
push ebp
call fcn.00402900
test al, al
je 0x40dc0a
mov edi, dword [esp + 0x18]
mov ecx, ebp
mov edx, ecx
lea esi, [esp + 0x74]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], ebp
mov byte [eax + ebp], 0
lea edi, [esp + 0xa8]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
mov ecx, dword [0x49014c]
sub ecx, edx
cmp ecx, esi
ja 0x40dc32
call fcn.0047e19b
test esi, esi
jbe 0x40dc7b
mov edx, dword [esp + 0x1c]
push 0
lea ecx, [esp + 0x18]
lea ebp, [edx + esi]
push ebp
call fcn.00402900
test al, al
je 0x40dc7b
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov ecx, esi
lea esi, [esp + 0xa8]
lea edi, [edx + eax]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x1c], ebp
mov byte [ecx + ebp], 0
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x40dc88
mov eax, 0x490148
mov edx, dword [esp + 0x28]
push 0
push eax
mov ecx, dword [edx + 0x10]
call fcn.00418a80
inc ebx
jmp 0x40db0b
inc esi
lea ecx, [esp + 0x4c]
mov dword [esp + 0x2c], esi
call fcn.004110d0
movsx eax, ax
cmp esi, eax
jl 0x40db09
lea ecx, [esp + 0x10]
mov byte [esp + 0x4b0], 0xb
call fcn.00404260
mov eax, dword [esp + 0x18]
mov byte [esp + 0x4b0], 1
test eax, eax
je 0x40dcf4
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x40dceb
cmp al, 0xff
je 0x40dceb
dec al
mov byte [ecx], al
jmp 0x40dcf4
push ecx
call fcn.0047e190
add esp, 4
mov edx, dword [esp + 0x4b8]
mov cl, byte [esp + 0x4c]
mov byte [edx], cl
mov ecx, dword [esp + 0x50]
test ecx, ecx
jne 0x40dd0d
xor eax, eax
jmp 0x40dd16
mov eax, dword [esp + 0x54]
sub eax, ecx
sar eax, 4
test eax, eax
jge 0x40dd1c
xor eax, eax
shl eax, 4
push eax
call fcn.0047e9c2
mov edi, dword [esp + 0x4bc]
mov ecx, dword [esp + 0x58]
mov ebp, dword [esp + 0x54]
add esp, 4
mov ebx, eax
cmp ebp, ecx
mov dword [edi + 4], eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ebx
je 0x40ddde
add ebp, 4
mov dword [esp + 0x48], ebx
test ebx, ebx
mov byte [esp + 0x4b0], 0xe
je 0x40ddc5
mov al, byte [ebp - 4]
mov byte [ebx], al
mov ecx, dword [ebp]
test ecx, ecx
jne 0x40dd6f
xor eax, eax
jmp 0x40dd77
mov eax, dword [ebp + 4]
sub eax, ecx
sar eax, 2
test eax, eax
jge 0x40dd7d
xor eax, eax
lea ecx, [eax*4]
push ecx
call fcn.0047e9c2
mov dword [ebx + 4], eax
mov ecx, dword [ebp + 4]
mov esi, dword [ebp]
add esp, 4
cmp esi, ecx
mov dword [esp + 0x3c], ecx
mov edi, eax
je 0x40ddb8
push esi
push edi
call fcn.00401410
mov eax, dword [esp + 0x44]
add esi, 4
add esp, 8
add edi, 4
cmp esi, eax
jne 0x40dda0
mov dword [ebx + 8], edi
mov dword [ebx + 0xc], edi
mov edi, dword [esp + 0x4b8]
mov eax, dword [esp + 0x28]
add ebp, 0x10
add ebx, 0x10
lea edx, [ebp - 4]
mov dword [esp + 0x2c], ebx
cmp edx, eax
jne 0x40dd4f
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ebx
mov ecx, dword [esp + 0x60]
mov al, byte [esp + 0x5c]
test ecx, ecx
mov byte [esp + 0x4b0], 0xf
mov byte [edi + 0x10], al
jne 0x40ddff
xor eax, eax
jmp 0x40de08
mov eax, dword [esp + 0x64]
sub eax, ecx
sar eax, 3
test eax, eax
jge 0x40de0e
xor eax, eax
lea ecx, [eax*8]
push ecx
call fcn.0047e9c2
mov ecx, dword [esp + 0x68]
mov ebx, dword [esp + 0x64]
add esp, 4
mov esi, eax
cmp ebx, ecx
mov dword [edi + 0x14], eax
mov ebp, ecx
mov dword [esp + 0x3c], esi
je 0x40de63
mov dword [esp + 0x2c], esi
test esi, esi
mov byte [esp + 0x4b0], 0x10
je 0x40de55
push ebx
mov ecx, esi
call fcn.00404130
mov dx, word [ebx + 4]
mov word [esi + 4], dx
add ebx, 8
add esi, 8
cmp ebx, ebp
mov dword [esp + 0x3c], esi
jne 0x40de35
mov al, byte [esp + 0x6c]
lea ecx, [esp + 0x4c]
mov dword [edi + 0x18], esi
mov dword [edi + 0x1c], esi
mov byte [edi + 0x20], al
mov dword [esp + 0x44], 1
mov byte [esp + 0x4b0], 0
call fcn.00410bf0
mov eax, edi
mov ecx, dword [esp + 0x4a8]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x4a4
ret 0xc