Function at 0x405780
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42acd0
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [str._t_a_f_b_f_t_f_n_a_v_b_f]
xor eax, esp
mov dword [esp + 0x70], eax
push ebx
push esi
push edi
mov eax, dword [str._t_a_f_b_f_t_f_n_a_v_b_f]
xor eax, esp
push eax
lea eax, [esp + 0x88]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
push 1
mov dword [esp + 0x14], ecx
xor ebx, ebx
push 0x42e9fc
lea ecx, [esp + 0x34]
mov esi, edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x4c], 0xf
mov dword [esp + 0x48], ebx
mov byte [esp + 0x38], bl
call fcn.00403e60
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x20]
mov dword [esp + 0x94], ebx
push eax
mov ebx, esi
call fcn.0040d010
add esp, 8
mov byte [esp + 0x90], 2
cmp dword [esp + 0x44], 0x10
jb 0x405793
mov ecx, dword [esp + 0x30]
push ecx
call fcn.00415d05
add esp, 4
mov ebx, dword [esp + 0x20]
test ebx, ebx
mov dword [esp + 0x44], 0xf
mov dword [esp + 0x40], 0
mov byte [esp + 0x30], 0
je 0x4057eb
mov ecx, dword [esp + 0x24]
sub ecx, ebx
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov esi, edx
shr esi, 0x1f
add esi, edx
cmp esi, 4
mov dword [esp + 0x18], esi
je 0x4057f2
mov edx, dword [esp + 0x10]
mov edi, dword [esp + 0x24]
push edx
mov eax, ebx
call fcn.0040ad10
push ebx
call fcn.00415d05
add esp, 8
xor al, al
jmp 0x405935
test esi, esi
ja 0x4057fb
call fcn.00415cf5
push 0xffffffffffffffff
push 0
push ebx
mov ecx, edi
call fcn.00403970
cmp esi, 1
ja 0x405811
call fcn.00415cf5
lea eax, [ebx + 0x1c]
push eax
mov edi, 0x42e9fc
lea esi, [esp + 0x4c]
call fcn.0040a500
add esp, 4
mov edi, eax
mov esi, dword [esp + 0x18]
cmp esi, 2
mov byte [esp + 0x90], 3
ja 0x40583e
call fcn.00415cf5
lea eax, [ebx + 0x38]
push eax
push edi
lea edi, [esp + 0x6c]
call fcn.0040a5b0
add esp, 8
mov byte [esp + 0x90], 5
cmp dword [esp + 0x60], 0x10
jb 0x40586b
mov eax, dword [esp + 0x4c]
push eax
call fcn.00415d05
add esp, 4
lea ecx, [esp + 0x64]
push ecx
mov ecx, dword [esp + 0x18]
xor edi, edi
mov dword [esp + 0x64], 0xf
mov dword [esp + 0x60], edi
mov byte [esp + 0x50], 0
call fcn.00405500
add esp, 4
test al, al
jne 0x4058d8
cmp dword [esp + 0x7c], 0x10
jb 0x4058a7
mov edx, dword [esp + 0x68]
push edx
call fcn.00415d05
add esp, 4
mov eax, dword [esp + 0x10]
mov dword [esp + 0x78], edi
mov edi, dword [esp + 0x24]
push eax
mov eax, ebx
mov dword [esp + 0x80], 0xf
mov byte [esp + 0x6c], 0
call fcn.0040ad10
push ebx
call fcn.00415d05
add esp, 8
xor al, al
jmp 0x405935
cmp esi, 3
ja 0x4058e2
call fcn.00415cf5
push 0xffffffffffffffff
push edi
lea ecx, [ebx + 0x54]
push ecx
mov ecx, dword [esp + 0x1c]
call fcn.00403970
cmp dword [esp + 0x7c], 0x10
jb 0x405906
mov edx, dword [esp + 0x68]
push edx
call fcn.00415d05
add esp, 4
mov eax, dword [esp + 0x10]
mov dword [esp + 0x78], edi
mov edi, dword [esp + 0x24]
push eax
mov eax, ebx
mov dword [esp + 0x80], 0xf
mov byte [esp + 0x6c], 0
call fcn.0040ad10
push ebx
call fcn.00415d05
add esp, 8
mov al, 1
mov ecx, dword [esp + 0x88]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.00415883
mov esp, ebp
pop ebp
ret