Function at 0x540008
Capabilities:
Access peb ldr_data
Check os version
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc4
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x28], edx
mov dword [ebp - 4], eax
lea esi, [ebp - 4]
xor eax, eax
push ebp
push 0x540b7a
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [esi]
cmp dword [eax + 0x9c], 0
setne byte [ebp - 0xb]
mov eax, dword [esi]
mov edx, dword [esi]
mov ecx, dword [edx + 8]
mov dword [eax + 0x10], ecx
mov ecx, dword [edx + 0xc]
mov dword [eax + 0x14], ecx
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
cdq
mov ecx, dword [esi]
add eax, dword [ecx + 0x88]
adc edx, dword [ecx + 0x8c]
mov ecx, dword [esi]
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], edx
mov eax, dword [esi]
mov edx, dword [esi]
mov ecx, dword [edx + 0x20]
mov dword [eax + 0x28], ecx
mov ecx, dword [edx + 0x24]
mov dword [eax + 0x2c], ecx
mov eax, dword [esi]
mov eax, dword [eax + 0x30]
cdq
mov ecx, dword [esi]
add eax, dword [ecx + 0x88]
adc edx, dword [ecx + 0x8c]
mov ecx, dword [esi]
mov dword [ecx + 0x38], eax
mov dword [ecx + 0x3c], edx
mov eax, dword [esi]
mov dword [eax + 0x44], 0xffffffff
mov eax, dword [esi]
mov dword [eax + 0x48], 0xffffffff
mov eax, dword [esi]
xor edx, edx
mov dword [eax + 0x4c], edx
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x78]
jle 0x5400cf
xor edi, edi
jmp 0x540b5f
mov edx, dword [esi]
cmp dword [edx + 0x50], 0
jne 0x5400e2
mov edx, dword [esi]
mov edx, dword [edx + 0x64]
mov bl, byte [edx + eax - 1]
jmp 0x5400f4
mov edx, eax
mov eax, dword [esi]
call fcn.00541464
mov ebx, eax
mov eax, dword [esi]
call fcn.005414a4
mov eax, dword [esi]
mov dword [eax + 0x48], 0xffffffff
mov eax, dword [esi]
xor edx, edx
mov dword [eax + 0x4c], edx
jmp 0x540175
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov ecx, 1
mov eax, dword [esi]
call fcn.00541570
cmp bl, 0xd
je 0x540121
cmp bl, 0xa
jne 0x540162
cmp bl, 0xd
jne 0x54014d
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
inc edx
mov eax, dword [esi]
call fcn.00541464
cmp al, 0xa
jne 0x54014d
mov eax, dword [esi]
inc dword [eax + 0x7c]
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov ecx, 1
mov eax, dword [esi]
call fcn.00541570
mov eax, dword [esi]
add dword [eax + 0x20], 1
adc dword [eax + 0x24], 0
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
inc eax
mov edx, dword [esi]
mov dword [edx + 0x30], eax
mov eax, dword [esi]
inc dword [eax + 0x7c]
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov eax, dword [esi]
call fcn.00541464
mov ebx, eax
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 4]
test al, al
jne 0x540106
mov eax, dword [esi]
cmp byte [eax + 0x18], 0
jne 0x54019c
mov eax, dword [esi]
cmp dword [eax + 0x4c], 0
je 0x54019c
mov edi, 0xffffff95
jmp 0x540b5f
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x78]
jle 0x5401af
xor edi, edi
jmp 0x540b5f
mov eax, dword [esi]
mov dword [eax + 0x48], 0xffffffff
mov eax, dword [esi]
xor edx, edx
mov dword [eax + 0x4c], edx
mov byte [ebp - 9], 0
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x28]
test al, al
je 0x540221
mov byte [ebp - 9], 1
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
mov dword [edx + 0x44], eax
jmp 0x5401f6
mov eax, dword [esi]
inc dword [eax + 0x7c]
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov eax, dword [esi]
call fcn.00541464
mov ebx, eax
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x78]
jg 0x54020c
cmp bl, 0xd
je 0x54020c
cmp bl, 0xa
jne 0x5401e3
mov edx, dword [esi]
mov ecx, dword [edx + 0x7c]
mov eax, dword [esi]
mov eax, dword [eax + 0x44]
sub ecx, eax
mov edx, eax
mov eax, dword [esi]
call fcn.00541570
push ebp
call fcn.0053ff98
pop ecx
test al, al
je 0x54030a
mov byte [ebp - 9], 1
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x78]
jg 0x54030a
mov edx, dword [esi]
mov dword [edx + 0x44], eax
jmp 0x5402e5
cmp bl, 0xd
je 0x540258
cmp bl, 0xa
jne 0x54028e
mov eax, dword [esi]
mov ebx, dword [eax + 0x7c]
mov eax, dword [esi]
cmp ebx, dword [eax + 0x78]
jge 0x540277
mov edx, ebx
inc edx
mov eax, dword [esi]
call fcn.00541464
cmp al, 0xa
jne 0x540277
mov eax, dword [esi]
inc dword [eax + 0x7c]
mov eax, dword [esi]
add dword [eax + 0x20], 1
adc dword [eax + 0x24], 0
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
inc eax
mov edx, dword [esi]
mov dword [edx + 0x30], eax
jmp 0x5402d2
xor edi, edi
mov eax, dword [esi]
mov eax, dword [eax + 0xac]
call fcn.00404978
mov dword [ebp - 8], eax
jmp 0x5402a3
inc edi
cmp edi, dword [ebp - 8]
jge 0x5402c3
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
add edx, edi
mov eax, dword [esi]
call fcn.00541464
mov edx, dword [esi]
mov edx, dword [edx + 0xac]
cmp al, byte [edx + edi]
je 0x5402a2
cmp edi, dword [ebp - 8]
jne 0x5402d2
mov eax, dword [esi]
mov edx, dword [ebp - 8]
add dword [eax + 0x7c], edx
jmp 0x5402f5
mov eax, dword [esi]
inc dword [eax + 0x7c]
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov eax, dword [esi]
call fcn.00541464
mov ebx, eax
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x78]
jle 0x54024e
mov edx, dword [esi]
mov ecx, dword [edx + 0x7c]
mov eax, dword [esi]
mov eax, dword [eax + 0x44]
sub ecx, eax
mov edx, eax
mov eax, dword [esi]
call fcn.00541570
mov eax, dword [esi]
mov al, byte [eax + 0x19]
xor al, 1
and al, byte [ebp - 9]
je 0x540320
mov edi, 0xffffff94
jmp 0x540b5f
cmp byte [ebp - 9], 0
jne 0x5400ba
mov eax, dword [esi]
mov dword [eax + 0x48], 0xffffffff
mov eax, dword [esi]
xor edx, edx
mov dword [eax + 0x4c], edx
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 8]
test al, al
je 0x5407ab
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x14]
test al, al
je 0x5403e1
mov edi, 0xffffff96
mov byte [ebp - 0xa], bl
mov eax, dword [esi]
cmp byte [eax + 0x40], 0
je 0x54037d
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov ecx, 1
mov eax, dword [esi]
call fcn.00541570
mov eax, dword [esi]
inc dword [eax + 0x7c]
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
mov dword [edx + 0x44], eax
mov dl, byte [ebp - 0xa]
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x20]
mov eax, dword [esi]
mov eax, dword [eax + 0x44]
mov edx, dword [esi]
mov edx, dword [edx + 0x7c]
cmp eax, edx
jge 0x5403b1
mov ecx, edx
sub ecx, eax
mov edx, eax
mov eax, dword [esi]
call fcn.00541570
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x78]
jg 0x540b43
mov edx, dword [esi]
cmp byte [edx + 0x40], 0
je 0x5403d7
mov edx, eax
mov ecx, 1
mov eax, dword [esi]
call fcn.00541570
mov eax, dword [esi]
inc dword [eax + 0x7c]
jmp 0x540b43
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x24]
test al, al
je 0x540463
mov edi, 0xffffff99
mov byte [ebp - 0xa], bl
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov ecx, 1
mov eax, dword [esi]
call fcn.00541570
mov eax, dword [esi]
inc dword [eax + 0x7c]
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
mov dword [edx + 0x44], eax
mov dl, byte [ebp - 0xa]
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x20]
mov eax, dword [esi]
mov eax, dword [eax + 0x44]
mov edx, dword [esi]
mov edx, dword [edx + 0x7c]
cmp eax, edx
jge 0x54043b
mov ecx, edx
sub ecx, eax
mov edx, eax
mov eax, dword [esi]
call fcn.00541570
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x78]
jg 0x540b43
mov edx, eax
mov ecx, 1
mov eax, dword [esi]
call fcn.00541570
mov eax, dword [esi]
inc dword [eax + 0x7c]
jmp 0x540b43
mov eax, dword [esi]
cmp byte [eax + 0x75], 0
je 0x540649
cmp bl, 0x24
jne 0x540649
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x78]
jge 0x540649
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
inc edx
mov eax, dword [esi]
call fcn.00541464
mov edx, eax
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x10]
test al, al
jne 0x540649
mov edi, 0xffffff96
mov eax, dword [esi]
cmp byte [eax + 0x40], 0
je 0x5404c4
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov ecx, 1
mov eax, dword [esi]
call fcn.00541570
mov eax, dword [esi]
inc dword [eax + 0x7c]
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
mov dword [edx + 0x44], eax
mov dl, 0x24
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x20]
lea eax, [ebp - 0x24]
push eax
mov eax, dword [esi]
mov ecx, dword [eax + 0x7c]
mov eax, dword [esi]
mov ebx, dword [eax + 0x44]
sub ecx, ebx
mov edx, ebx
mov eax, dword [esi]
call fcn.00541584
mov eax, dword [esi]
cmp byte [eax + 0x40], 0
je 0x54051f
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x44]
jle 0x54051f
mov eax, dword [esi]
mov ecx, dword [eax + 0x7c]
mov eax, dword [esi]
sub ecx, dword [eax + 0x44]
mov eax, dword [esi]
mov edx, dword [eax + 0x44]
mov eax, dword [esi]
call fcn.00541570
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x78]
jg 0x540b43
mov eax, dword [esi]
cmp byte [eax + 0x40], 0
je 0x540548
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov ecx, 1
mov eax, dword [esi]
call fcn.00541570
mov eax, dword [esi]
inc dword [eax + 0x7c]
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
mov dword [edx + 0x44], eax
mov dl, 0x24
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x20]
mov eax, dword [esi]
mov eax, dword [eax + 0x44]
mov edx, dword [esi]
mov edx, dword [edx + 0x7c]
cmp eax, edx
jge 0x54057b
mov ecx, edx
sub ecx, eax
mov edx, eax
mov eax, dword [esi]
call fcn.00541570
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov ebx, eax
mov edx, dword [esi]
cmp eax, dword [edx + 0x78]
jg 0x5405eb
mov edx, eax
mov ecx, 1
mov eax, dword [esi]
call fcn.00541570
mov eax, dword [esi]
inc dword [eax + 0x7c]
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
mov dword [edx + 0x44], eax
mov dl, 0x24
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x20]
lea eax, [ebp - 0x28]
push eax
mov eax, dword [esi]
mov ecx, dword [eax + 0x7c]
mov eax, dword [esi]
sub ecx, dword [eax + 0x44]
mov eax, dword [esi]
mov edx, dword [eax + 0x44]
mov eax, dword [esi]
call fcn.00541584
mov eax, dword [esi]
mov eax, dword [eax + 0x44]
mov edx, dword [esi]
cmp eax, dword [edx + 0x7c]
jge 0x5405eb
mov eax, dword [esi]
mov ecx, dword [eax + 0x7c]
mov eax, dword [esi]
sub ecx, dword [eax + 0x44]
mov eax, dword [esi]
mov edx, dword [eax + 0x44]
mov eax, dword [esi]
call fcn.00541570
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
call fcn.00404ac4
je 0x540608
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x78]
jle 0x54054d
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x78]
jg 0x540b43
mov eax, dword [esi]
cmp byte [eax + 0x40], 0
je 0x540633
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov ecx, 1
mov eax, dword [esi]
call fcn.00541570
jmp 0x54063f
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
sub eax, ebx
mov edx, dword [esi]
sub dword [edx + 0x4c], eax
mov eax, dword [esi]
inc dword [eax + 0x7c]
jmp 0x540b43
mov edi, 0xffffff9a
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
mov dword [edx + 0x48], eax
mov eax, dword [esi]
xor edx, edx
mov dword [eax + 0x4c], edx
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], 1
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov ecx, 1
mov eax, dword [esi]
call fcn.00541570
mov eax, dword [esi]
inc dword [eax + 0x7c]
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov eax, dword [esi]
call fcn.00541464
mov ebx, eax
mov eax, dword [esi]
mov eax, dword [eax + 0x90]
push eax
mov eax, dword [esi]
mov ecx, dword [eax + 0x4c]
mov eax, dword [esi]
mov edx, dword [eax + 0x48]
mov eax, dword [esi]
call fcn.0053fe7c
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
je 0x540714
lea ecx, [ebp - 0x2c]
mov eax, dword [esi]
mov eax, dword [eax + 0x90]
mov edx, dword [ebp - 0x10]
mov edi, dword [eax]
call dword [edi + 0xc]
mov edx, dword [ebp - 0x2c]
mov eax, dword [esi]
add eax, 0xa4
call fcn.004046e0
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi]
mov eax, dword [eax + 0x90]
mov edx, dword [ebp - 0x10]
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov edi, eax
test edi, edi
jg 0x540719
mov ecx, 0x306
mov edx, 0x540b94
mov eax, 0x540bd4
call fcn.004045e8
jmp 0x540719
mov eax, dword [esi]
dec dword [eax + 0x4c]
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 8]
test al, al
jne 0x540677
cmp edi, 0xffffff9a
jne 0x540778
mov eax, dword [esi]
mov edx, dword [ebp - 0x14]
mov dword [eax + 0x48], edx
mov eax, dword [esi]
mov edx, dword [ebp - 0x18]
mov dword [eax + 0x4c], edx
cmp byte [ebp - 0xb], 0
je 0x54079e
mov eax, dword [esi]
mov eax, dword [eax + 0x9c]
call fcn.00404978
dec eax
jne 0x54079e
mov eax, dword [esi]
mov edx, dword [eax + 0x48]
mov eax, dword [esi]
call fcn.00541464
mov edx, dword [esi]
mov edx, dword [edx + 0x9c]
cmp al, byte [edx]
sete al
mov edx, dword [esi]
mov byte [edx + 0xa0], al
jmp 0x54079e
cmp byte [ebp - 0xb], 0
je 0x54079e
mov eax, dword [esi]
mov eax, dword [eax + 0x9c]
mov edx, dword [esi]
mov edx, dword [edx + 0xa4]
call fcn.00404ac4
sete al
mov edx, dword [esi]
mov byte [edx + 0xa0], al
mov eax, dword [esi]
mov edx, dword [ebp - 0x1c]
mov dword [eax + 0x7c], edx
jmp 0x540b43
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0xc]
test al, al
jne 0x5407c1
cmp bl, 0x5f
jne 0x54099e
mov edi, 0xffffff99
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
mov dword [edx + 0x44], eax
mov byte [ebp - 0x1d], bl
cmp byte [ebp - 0xb], 0
je 0x540822
cmp bl, 0x61
jb 0x5407e6
cmp bl, 0x7a
ja 0x5407e6
sub bl, 0x20
mov eax, dword [esi]
mov eax, dword [eax + 0x9c]
call fcn.00404978
mov edx, dword [esi]
mov edx, dword [edx + 0x7c]
mov ecx, dword [esi]
sub edx, dword [ecx + 0x44]
inc edx
cmp eax, edx
jl 0x540819
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
sub eax, dword [edx + 0x44]
mov edx, dword [esi]
mov edx, dword [edx + 0x9c]
cmp bl, byte [edx + eax]
je 0x54081d
xor eax, eax
jmp 0x54081f
mov al, 1
mov byte [ebp - 0xb], al
mov eax, dword [esi]
inc dword [eax + 0x7c]
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov eax, dword [esi]
call fcn.00541464
mov ebx, eax
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0xc]
test al, al
jne 0x5407d3
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x10]
test al, al
jne 0x5407d3
cmp bl, 0x5f
je 0x5407d3
mov eax, dword [esi]
cmp byte [eax + 0x74], 0
je 0x540979
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
sub eax, dword [edx + 0x44]
dec eax
jne 0x540979
cmp byte [ebp - 0x1d], 0x71
je 0x540885
cmp byte [ebp - 0x1d], 0x51
jne 0x540979
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x14]
test al, al
je 0x540979
mov edi, 0xffffff96
mov byte [ebp - 0xa], bl
mov eax, dword [esi]
inc dword [eax + 0x7c]
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x78]
jg 0x540922
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov eax, dword [esi]
call fcn.00541464
mov byte [ebp - 0x1d], al
mov al, byte [ebp - 0x1d]
sub al, 0x28
je 0x5408e5
sub al, 0x14
je 0x5408df
sub al, 0x1f
je 0x5408d3
sub al, 0x20
je 0x5408d9
jmp 0x5408e9
mov byte [ebp - 0x1d], 0x5d
jmp 0x5408e9
mov byte [ebp - 0x1d], 0x7d
jmp 0x5408e9
mov byte [ebp - 0x1d], 0x3e
jmp 0x5408e9
mov byte [ebp - 0x1d], 0x29
mov byte [ebp - 0x1e], 0
mov eax, dword [esi]
inc dword [eax + 0x7c]
jmp 0x540916
mov edx, eax
mov eax, dword [esi]
call fcn.00541464
mov ebx, eax
mov eax, dword [esi]
inc dword [eax + 0x7c]
cmp byte [ebp - 0x1e], 0
je 0x54090f
cmp bl, byte [ebp - 0xa]
je 0x540922
cmp bl, byte [ebp - 0x1d]
sete byte [ebp - 0x1e]
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x78]
jle 0x5408f4
mov eax, dword [esi]
cmp byte [eax + 0x40], 0
je 0x540945
mov eax, dword [esi]
mov ecx, dword [eax + 0x7c]
mov eax, dword [esi]
sub ecx, dword [eax + 0x44]
mov eax, dword [esi]
mov edx, dword [eax + 0x44]
mov eax, dword [esi]
call fcn.00541570
jmp 0x540b43
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov edx, dword [esi]
sub eax, dword [edx + 0x44]
cmp eax, 5
jle 0x540b43
mov eax, dword [esi]
mov ecx, dword [eax + 0x7c]
mov eax, dword [esi]
sub ecx, dword [eax + 0x44]
sub ecx, 5
mov eax, dword [esi]
mov edx, dword [eax + 0x44]
add edx, 3
mov eax, dword [esi]
call fcn.00541570
jmp 0x540b43
mov eax, dword [esi]
mov dl, byte [ebp - 0xb]
mov byte [eax + 0xa0], dl
mov edx, dword [esi]
mov ecx, dword [edx + 0x7c]
mov eax, dword [esi]
mov eax, dword [eax + 0x44]
sub ecx, eax
mov edx, eax
mov eax, dword [esi]
call fcn.00541570
jmp 0x540b43
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x10]
test al, al
je 0x540ade
mov edi, 0xffffff97
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov ecx, 1
mov eax, dword [esi]
call fcn.00541570
cmp byte [ebp - 0xb], 0
je 0x540a0b
mov eax, dword [esi]
mov eax, dword [eax + 0x9c]
call fcn.00404978
mov edx, dword [esi]
mov edx, dword [edx + 0x7c]
sub edx, dword [ebp - 0x1c]
inc edx
cmp eax, edx
jl 0x540a02
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
sub eax, dword [ebp - 0x1c]
mov edx, dword [esi]
mov edx, dword [edx + 0x9c]
cmp bl, byte [edx + eax]
je 0x540a06
xor eax, eax
jmp 0x540a08
mov al, 1
mov byte [ebp - 0xb], al
mov eax, dword [esi]
inc dword [eax + 0x7c]
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov eax, dword [esi]
call fcn.00541464
mov ebx, eax
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x10]
test al, al
jne 0x5409bc
mov eax, dword [esi]
mov dl, byte [ebp - 0xb]
mov byte [eax + 0xa0], dl
lea eax, [ebp - 0x30]
mov edx, ebx
call fcn.00404874
mov eax, dword [ebp - 0x30]
mov edx, dword [esi]
mov edx, dword [edx + 0xb0]
call fcn.00404ac4
jne 0x540b43
mov eax, dword [esi]
mov eax, dword [eax + 0x7c]
inc eax
mov edx, dword [esi]
cmp eax, dword [edx + 0x78]
jg 0x540b43
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
inc edx
mov eax, dword [esi]
call fcn.00541464
mov edx, eax
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x10]
test al, al
je 0x540b43
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov ecx, 1
mov eax, dword [esi]
call fcn.00541570
mov eax, dword [esi]
inc dword [eax + 0x7c]
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov eax, dword [esi]
call fcn.00541464
mov ebx, eax
jmp 0x540acf
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov ecx, 1
mov eax, dword [esi]
call fcn.00541570
mov eax, dword [esi]
inc dword [eax + 0x7c]
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov eax, dword [esi]
call fcn.00541464
mov ebx, eax
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x10]
test al, al
jne 0x540aab
jmp 0x540b43
push 0x540bf0
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov eax, dword [esi]
call fcn.00541464
mov edx, eax
lea eax, [ebp - 0x38]
call fcn.00404874
push dword [ebp - 0x38]
push 0x540c18
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov eax, dword [esi]
call fcn.00541464
and eax, 0xff
lea ecx, [ebp - 0x3c]
mov edx, 4
call fcn.0040a1bc
push dword [ebp - 0x3c]
lea eax, [ebp - 0x34]
mov edx, 4
call fcn.00404a38
mov ecx, dword [ebp - 0x34]
mov dl, 1
mov eax, dword [0x408840]
call fcn.0040f05c
call fcn.00404008
cmp edi, 0x80000001
jne 0x540b5f
mov ecx, 0x36c
mov edx, 0x540b94
mov eax, 0x540bd4
call fcn.004045e8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x540b81
lea eax, [ebp - 0x3c]
mov edx, 7
call fcn.004046b0
ret