Function at 0x40f870
Capabilities:
Check os version

Disassembly:
push 0xffffffffffffffff
push 0x48cbb8
mov eax, dword fs:[0]
push eax
sub esp, 0x19c
mov eax, dword [0x4a9070]
xor eax, esp
mov dword [esp + 0x198], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4a9070]
xor eax, esp
push eax
lea eax, [esp + 0x1b0]
mov dword fs:[0], eax
mov eax, dword [esp + 0x1c0]
and dword [esp + 0x2c], 0xfffffe00
xor ebx, ebx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x1c4]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x1b8], 1
mov ebp, 0xf
mov dword [esp + 0x18], ebx
mov dword [esp + 0xa0], ebp
mov dword [esp + 0x9c], ebx
mov byte [esp + 0x8c], bl
mov esi, 0x10
mov byte [esp + 0x1b8], 2
cmp dword [eax + 0x18], esi
jb 0x40f913
mov eax, dword [eax + 4]
jmp 0x40f916
add eax, 4
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x8c]
push edx
lea ecx, [esp + 0x20]
push ecx
push eax
call fcn.0042faf8
add esp, 0x10
test al, al
je 0x40fcdd
cmp dword [esp + 0x18], ebx
jne 0x40fcdd
push str.departments
lea edx, [esp + 0x28]
push edx
mov ecx, 0x491a4b
call fcn.00426dc1
push eax
lea eax, [esp + 0x70]
push eax
call fcn.00425f5e
mov byte [esp + 0x1b8], 3
cmp byte [esp + 0x74], 6
jne 0x40f9f8
lea eax, [esp + 0x6c]
xor edi, edi
call fcn.00426aba
test eax, eax
jbe 0x40f9f8
lea eax, [esp + 0xa4]
call fcn.0040a740
push edi
lea ecx, [esp + 0x70]
push ecx
mov byte [esp + 0x1c0], 4
call fcn.00426b0a
push eax
lea edx, [esp + 0xa8]
push edx
call fcn.0040e250
test al, al
je 0x40f9d6
mov edx, dword [esp + 0x20]
add edx, 0x18
lea ecx, [esp + 0xa4]
call fcn.00415d00
mov esi, eax
lea eax, [esp + 0xa4]
call fcn.0040ab40
lea esi, [esp + 0xa4]
mov byte [esp + 0x1b8], 3
call fcn.0040aa70
lea eax, [esp + 0x6c]
inc edi
call fcn.00426aba
cmp edi, eax
jb 0x40f984
push str.clients
lea eax, [esp + 0x28]
push eax
mov ecx, 0x491a93
call fcn.00426dc1
push eax
lea ecx, [esp + 0x58]
push ecx
call fcn.00425f5e
mov byte [esp + 0x1b8], 5
cmp byte [esp + 0x5c], 6
jne case.0x40fa3e.0
xor edi, edi
lea esp, [esp]
movsx eax, byte [esp + 0x5c]
cmp eax, 7
ja case.0x40fa3e.0
jmp dword [eax*4 + 0x40fd4c]
mov eax, dword [esp + 0x54]
cmp dword [eax + 0x1c], ebx
je case.0x40fa3e.0
mov ecx, dword [eax + 0x18]
mov eax, dword [eax]
lea esi, [esp + 0x18]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
call fcn.0042949b
mov eax, dword [esp + 0x18]
cmp eax, ebx
jne 0x40fa8b
call fcn.0047000d
xor eax, eax
mov esi, dword [esp + 0x1c]
cmp esi, dword [eax + 0x18]
jne 0x40fa85
call fcn.0047000d
mov eax, dword [esi + 0x14]
inc eax
jmp 0x40fa96
mov eax, dword [eax]
jmp 0x40fa77
mov edx, dword [esp + 0x54]
mov eax, dword [edx + 0x1c]
cmp edi, eax
jae case.0x40fa3e.0
lea eax, [esp + 0xa4]
call fcn.0040abc0
push edi
lea eax, [esp + 0x58]
push eax
mov byte [esp + 0x1c0], 6
call fcn.00426b0a
push eax
lea ecx, [esp + 0xa8]
push ecx
call fcn.0040e7d0
test al, al
je 0x40faec
mov edx, dword [esp + 0x20]
add edx, 0x38
lea ecx, [esp + 0xa4]
call fcn.00415e80
mov esi, eax
lea eax, [esp + 0xa4]
call fcn.0040ada0
lea esi, [esp + 0xa4]
mov byte [esp + 0x1b8], 5
call fcn.0040ac50
inc edi
jmp 0x40fa30
push str.accounts
lea edx, [esp + 0x28]
push edx
mov ecx, 0x491a9c
call fcn.00426dc1
push eax
lea eax, [esp + 0x40]
push eax
call fcn.00425f5e
cmp byte [esp + 0x44], 6
jne 0x40fc96
xor ebp, ebp
movsx eax, byte [esp + 0x44]
cmp eax, 7
ja case.0x40fb40.0
jmp dword [eax*4 + 0x40fd6c]
mov eax, dword [esp + 0x3c]
cmp dword [eax + 0x1c], ebx
je case.0x40fb40.0
mov ecx, dword [eax + 0x18]
mov eax, dword [eax]
lea esi, [esp + 0x18]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
call fcn.0042949b
mov eax, dword [esp + 0x18]
cmp eax, ebx
jne 0x40fb8d
call fcn.0047000d
xor eax, eax
mov esi, dword [esp + 0x1c]
cmp esi, dword [eax + 0x18]
jne 0x40fb87
call fcn.0047000d
mov eax, dword [esi + 0x14]
inc eax
jmp 0x40fb98
mov eax, dword [eax]
jmp 0x40fb79
mov ecx, dword [esp + 0x3c]
mov eax, dword [ecx + 0x1c]
cmp ebp, eax
jae case.0x40fb40.0
mov eax, 0xf
mov dword [esp + 0xbc], eax
mov dword [esp + 0xb8], ebx
mov byte [esp + 0xa8], bl
mov dword [esp + 0xd8], eax
mov dword [esp + 0xd4], ebx
mov byte [esp + 0xc4], bl
mov dword [esp + 0xf4], eax
mov dword [esp + 0xf0], ebx
mov byte [esp + 0xe0], bl
mov dword [esp + 0x110], eax
mov dword [esp + 0x10c], ebx
mov byte [esp + 0xfc], bl
mov dword [esp + 0x12c], eax
mov dword [esp + 0x128], ebx
mov byte [esp + 0x118], bl
mov dword [esp + 0x148], eax
mov dword [esp + 0x144], ebx
mov byte [esp + 0x134], bl
mov dword [esp + 0x164], eax
mov dword [esp + 0x160], ebx
mov byte [esp + 0x150], bl
push ebp
lea edx, [esp + 0x40]
push edx
mov byte [esp + 0x1c0], 8
call fcn.00426b0a
lea ecx, [esp + 0xa4]
push ecx
mov ecx, eax
call fcn.0040f000
test al, al
je 0x40fc7f
mov edx, dword [esp + 0x20]
add edx, 0x58
lea ecx, [esp + 0xc0]
call fcn.00415fa0
lea edi, [esp + 0xa4]
mov esi, eax
call fcn.0040afb0
lea esi, [esp + 0xa4]
call fcn.0040aec0
inc ebp
jmp 0x40fb32
mov ebp, 0xf
lea esi, [esp + 0x3c]
mov byte [esp + 0x1b8], 5
call fcn.004260f7
lea esi, [esp + 0x54]
mov byte [esp + 0x1b8], 3
call fcn.004260f7
lea esi, [esp + 0x6c]
mov byte [esp + 0x1b8], 2
call fcn.004260f7
cmp dword [esp + 0xa0], 0x10
jb 0x40fcf6
mov edx, dword [esp + 0x8c]
push edx
jmp 0x40fcee
cmp dword [esp + 0xa0], esi
jb 0x40fcf6
mov eax, dword [esp + 0x8c]
push eax
call fcn.004700ac
add esp, 4
lea esi, [esp + 0x24]
mov dword [esp + 0xa0], ebp
mov dword [esp + 0x9c], ebx
mov byte [esp + 0x8c], bl
mov dword [esp + 0x1b8], 0xffffffff
call fcn.004260f7
mov ecx, dword [esp + 0x1b0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x198]
xor ecx, esp
call fcn.0046fab6
add esp, 0x1a8
ret 8