Function at 0x10040480
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1013c918
mov eax, dword fs:[0]
push eax
sub esp, 0x60
push ebx
push esi
push edi
mov eax, dword [0x1019bc84]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x30], edi
lea ebx, [edi + 0x8c]
mov esi, dword [ebx]
mov ecx, ebx
mov dword [ebp - 4], 0
push dword [esi + 4]
call fcn.10041370
mov eax, dword [ebx]
mov dword [ebp - 4], 0xffffffff
mov dword [eax + 4], esi
mov eax, dword [ebx]
mov dword [eax], esi
mov eax, dword [ebx]
mov dword [eax + 8], esi
mov dword [ebx + 4], 0
mov eax, dword [edi + 4]
sub eax, 0x10
push eax
call fcn.1000c300
mov ebx, eax
add esp, 4
mov dword [ebp - 0x2c], ebx
lea eax, [ebx + 0x10]
mov dword [ebp - 0x6c], eax
lea ecx, [ebp - 0x50]
mov dword [ebp - 4], 1
push ecx
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov ecx, eax
or eax, 0xffffffff
mov dword [ebp - 0x54], ecx
test ecx, ecx
je 0x100410be
call fcn.1000ca70
mov ecx, eax
test ecx, ecx
je 0x100410ed
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 2
call fcn.1000ca70
mov ecx, eax
test ecx, ecx
je 0x100410f7
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x18], edi
xor eax, eax
mov byte [ebp - 4], 3
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x50], eax
jle 0x10041073
nop dword [eax + eax]
mov ecx, dword [ebp - 0x54]
mov eax, dword [ecx + eax*4]
mov dword [ebp - 0x34], eax
call fcn.1000ca70
mov ecx, eax
test ecx, ecx
je 0x100410ed
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x20], eax
push dword [ebp - 0x34]
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 4
call fcn.1000df70
test al, al
jne 0x100405da
mov edx, dword [ebp - 0x34]
test edx, edx
jne 0x100405b1
xor ecx, ecx
jmp 0x100405d0
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x34], eax
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100405c0
sub ecx, dword [ebp - 0x34]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x20]
call fcn.1000d5b0
push 0x101579e8
push dword [ebp - 0x20]
mov byte [ebp - 4], 5
call fcn.10112f8c
mov edx, eax
add esp, 8
mov eax, dword [ebp - 0x20]
test edx, edx
je 0x10040cc3
sub edx, eax
sar edx, 1
mov dword [ebp - 0x58], edx
cmp edx, 0xffffffff
je 0x10040cc3
xor ecx, ecx
test edx, edx
cmovns ecx, edx
mov dword [ebp - 0x28], ecx
cmp ecx, dword [eax - 0xc]
jl 0x10040631
add eax, 0xfffffff0
push eax
mov dword [ebp - 0x34], eax
call fcn.1000c300
add esp, 4
add eax, 0x10
mov dword [ebp - 0x3c], eax
jmp 0x10040665
mov ecx, dword [eax - 0x10]
add eax, 0xfffffff0
mov dword [ebp - 0x34], eax
test ecx, ecx
je 0x10040647
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x10040653
call fcn.1000ca70
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
push eax
push dword [ebp - 0x28]
lea ecx, [ebp - 0x3c]
push dword [ebp - 0x20]
call fcn.100104b0
mov eax, dword [ebp - 0x3c]
lea edx, [eax - 0x10]
mov byte [ebp - 4], 6
lea ecx, [esi - 0x10]
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x10], ecx
cmp edx, ecx
je 0x100406c8
cmp dword [ecx + 0xc], 0
jl 0x100406b6
mov esi, dword [ebp - 0x10]
mov ecx, dword [edx]
cmp ecx, dword [esi]
jne 0x100406b6
push edx
call fcn.1000c300
add esp, 4
mov dword [ebp - 0x10], eax
or ecx, 0xffffffff
lea edx, [esi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x100406ae
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x10]
lea esi, [eax + 0x10]
mov dword [ebp - 0x1c], esi
jmp 0x100406c5
push dword [eax - 0xc]
lea ecx, [ebp - 0x1c]
push eax
call fcn.1000d5b0
mov esi, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x28]
mov byte [ebp - 4], 5
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x100406e1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
movzx eax, word [esi]
push eax
mov dword [ebp - 0x28], esi
call fcn.10110679
add esp, 4
test eax, eax
je 0x100407ec
mov edi, esi
nop word [eax + eax]
movzx eax, word [edi + 2]
add edi, 2
push eax
call fcn.10110679
add esp, 4
test eax, eax
jne 0x10040700
mov dword [ebp - 0x28], edi
mov edx, dword [ebp - 0x28]
mov edi, dword [ebp - 0x18]
cmp edx, esi
je 0x100407ec
mov eax, dword [esi - 0xc]
sub edx, esi
sar edx, 1
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x10], eax
test eax, eax
js 0x10041101
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, dword [esi - 0xc]
or eax, ecx
jge 0x1004075d
push dword [ebp - 0x10]
lea ecx, [ebp - 0x1c]
call fcn.1000af00
mov esi, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x28]
lea eax, [esi + edx*2]
mov dword [ebp - 0x28], eax
mov eax, dword [esi - 0xc]
sub eax, edx
mov dword [ebp - 0x10], eax
lea ecx, [eax*2 + 2]
test ecx, ecx
je 0x100407c4
mov edx, dword [ebp - 0x28]
test edx, edx
jne 0x10040794
call fcn.100ffec9
mov dword [eax], 0x16
call fcn.100ffda3
mov eax, 0x16
jmp 0x100407c6
mov eax, dword [esi - 0xc]
lea eax, [eax*2 + 2]
cmp eax, ecx
jae 0x100407b9
call fcn.100ffec9
mov dword [eax], 0x22
call fcn.100ffda3
mov eax, 0x22
jmp 0x100407c6
push ecx
push edx
push esi
call fcn.100e3d40
add esp, 0xc
xor eax, eax
push eax
call fcn.1000ded0
mov eax, dword [ebp - 0x10]
add esp, 4
test eax, eax
js 0x10041101
cmp eax, dword [esi - 8]
jg 0x10041101
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
movzx eax, word [esi]
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x10], 0
test ax, ax
je 0x1004087c
mov ebx, dword [ebp - 0x10]
mov ecx, eax
mov edi, esi
push ecx
call fcn.10110679
add esp, 4
test eax, eax
je 0x1004081d
test ebx, ebx
mov eax, edi
cmovne eax, ebx
mov ebx, eax
jmp 0x1004081f
xor ebx, ebx
movzx eax, word [edi + 2]
add edi, 2
mov ecx, eax
test ax, ax
jne 0x10040805
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x10], ebx
mov edx, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x2c]
test edx, edx
je 0x1004087c
sub edx, esi
sar edx, 1
mov dword [ebp - 0x10], edx
js 0x10041101
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x1004086a
push edx
lea ecx, [ebp - 0x1c]
call fcn.1000af00
mov esi, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x10]
cmp edx, dword [esi - 8]
jg 0x10041101
xor eax, eax
mov dword [esi - 0xc], edx
mov word [esi + edx*2], ax
mov eax, dword [ebp - 0x20]
xor edx, edx
mov ecx, dword [eax - 0xc]
mov eax, ecx
sub eax, dword [ebp - 0x58]
add eax, 0xffffffff
mov dword [ebp - 0x28], ecx
cmovns edx, eax
cmp edx, ecx
mov dword [ebp - 0x58], edx
mov ecx, dword [ebp - 0x34]
jl 0x100408ad
push ecx
call fcn.1000c300
add esp, 4
add eax, 0x10
mov dword [ebp - 0x40], eax
jmp 0x100408e4
mov ecx, dword [ecx]
test ecx, ecx
je 0x100408bc
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x100408c8
call fcn.1000ca70
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
mov ecx, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x58]
sub ecx, eax
push eax
mov eax, dword [ebp - 0x20]
lea eax, [eax + ecx*2]
push eax
lea ecx, [ebp - 0x40]
call fcn.100104b0
mov eax, dword [ebp - 0x40]
lea edx, [eax - 0x10]
mov byte [ebp - 4], 7
lea ecx, [edi - 0x10]
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x58], ecx
cmp edx, ecx
je 0x10040947
cmp dword [ecx + 0xc], 0
jl 0x10040935
mov edi, dword [ebp - 0x58]
mov ecx, dword [edx]
cmp ecx, dword [edi]
jne 0x10040935
push edx
call fcn.1000c300
add esp, 4
mov dword [ebp - 0x58], eax
or ecx, 0xffffffff
lea edx, [edi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x1004092d
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x58]
lea edi, [eax + 0x10]
mov dword [ebp - 0x18], edi
jmp 0x10040944
push dword [eax - 0xc]
lea ecx, [ebp - 0x18]
push eax
call fcn.1000d5b0
mov edi, dword [ebp - 0x18]
mov edx, dword [ebp - 0x28]
mov byte [ebp - 4], 5
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10040960
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
movzx eax, word [edi]
push eax
mov dword [ebp - 0x28], edi
call fcn.10110679
add esp, 4
test eax, eax
je 0x10040a6c
mov ebx, edi
nop dword [eax]
movzx eax, word [ebx + 2]
add ebx, 2
push eax
call fcn.10110679
add esp, 4
test eax, eax
jne 0x10040980
mov dword [ebp - 0x28], ebx
mov edx, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x2c]
cmp edx, edi
je 0x10040a6c
mov eax, dword [edi - 0xc]
sub edx, edi
sar edx, 1
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x58], eax
test eax, eax
js 0x10041101
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, dword [edi - 0xc]
or eax, ecx
jge 0x100409dd
push dword [ebp - 0x58]
lea ecx, [ebp - 0x18]
call fcn.1000af00
mov edi, dword [ebp - 0x18]
mov edx, dword [ebp - 0x28]
lea eax, [edi + edx*2]
mov dword [ebp - 0x58], eax
mov eax, dword [edi - 0xc]
sub eax, edx
mov dword [ebp - 0x28], eax
lea ecx, [eax*2 + 2]
test ecx, ecx
je 0x10040a44
mov edx, dword [ebp - 0x58]
test edx, edx
jne 0x10040a14
call fcn.100ffec9
mov dword [eax], 0x16
call fcn.100ffda3
mov eax, 0x16
jmp 0x10040a46
mov eax, dword [edi - 0xc]
lea eax, [eax*2 + 2]
cmp eax, ecx
jae 0x10040a39
call fcn.100ffec9
mov dword [eax], 0x22
call fcn.100ffda3
mov eax, 0x22
jmp 0x10040a46
push ecx
push edx
push edi
call fcn.100e3d40
add esp, 0xc
xor eax, eax
push eax
call fcn.1000ded0
mov eax, dword [ebp - 0x28]
add esp, 4
test eax, eax
js 0x10041101
cmp eax, dword [edi - 8]
jg 0x10041101
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
movzx eax, word [edi]
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x10], 0
test ax, ax
je 0x10040afa
mov ebx, dword [ebp - 0x10]
mov ecx, eax
push ecx
call fcn.10110679
add esp, 4
test eax, eax
je 0x10040a9b
test ebx, ebx
mov eax, edi
cmovne eax, ebx
mov ebx, eax
jmp 0x10040a9d
xor ebx, ebx
movzx eax, word [edi + 2]
add edi, 2
mov ecx, eax
test ax, ax
jne 0x10040a83
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x10], ebx
mov edx, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x2c]
test edx, edx
je 0x10040afa
sub edx, edi
sar edx, 1
mov dword [ebp - 0x10], edx
js 0x10041101
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, edx
or eax, ecx
jge 0x10040ae8
push edx
lea ecx, [ebp - 0x18]
call fcn.1000af00
mov edi, dword [ebp - 0x18]
mov edx, dword [ebp - 0x10]
cmp edx, dword [edi - 8]
jg 0x10041101
xor eax, eax
mov dword [edi - 0xc], edx
mov word [edi + edx*2], ax
cmp dword [edi - 0xc], 1
jg 0x10040b14
lea eax, [edi - 0x10]
push eax
call fcn.1000c300
add esp, 4
add eax, 0x10
mov dword [ebp - 0x44], eax
jmp 0x10040b3f
mov ecx, dword [edi - 0x10]
test ecx, ecx
je 0x10040b24
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x10040b30
call fcn.1000ca70
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
push eax
push 1
push edi
lea ecx, [ebp - 0x44]
call fcn.100104b0
mov eax, dword [ebp - 0x44]
cmp dword [eax - 0xc], 1
jne 0x10040b4f
cmp word [eax], 0x22
mov byte [ebp - 0xd], 1
je 0x10040b53
mov byte [ebp - 0xd], 0
lea edx, [eax - 0x10]
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10040b6b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xd], 0
je 0x10040bb1
mov eax, dword [edi - 0xc]
lea ecx, [ebp - 0x18]
dec eax
push eax
lea eax, [ebp - 0x5c]
push eax
call fcn.100290d0
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 8
call fcn.1001cb00
mov edx, dword [ebp - 0x5c]
or eax, 0xffffffff
mov byte [ebp - 4], 5
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10040bae
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x18]
mov eax, dword [edi - 0xc]
cmp eax, 1
mov dword [ebp - 0x58], eax
lea eax, [edi - 0x10]
mov dword [ebp - 0x28], eax
jg 0x10040bd3
push eax
call fcn.1000c300
add esp, 4
add eax, 0x10
mov dword [ebp - 0x48], eax
jmp 0x10040c04
mov ecx, dword [eax]
test ecx, ecx
je 0x10040be2
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x10040bee
call fcn.1000ca70
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
push eax
mov eax, dword [ebp - 0x58]
lea ecx, [ebp - 0x48]
dec eax
push 1
lea eax, [edi + eax*2]
push eax
call fcn.100104b0
mov eax, dword [ebp - 0x48]
cmp dword [eax - 0xc], 1
jne 0x10040c14
cmp word [eax], 0x22
mov byte [ebp - 0xd], 1
je 0x10040c18
mov byte [ebp - 0xd], 0
lea edx, [eax - 0x10]
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10040c30
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xd], 0
je 0x10040e8c
mov ecx, dword [edi - 0xc]
xor edx, edx
lea eax, [ecx - 1]
test eax, eax
cmovns edx, eax
mov dword [ebp - 0x58], edx
cmp edx, ecx
jl 0x10040c62
mov eax, dword [ebp - 0x28]
push eax
call fcn.1000c300
add esp, 4
lea edi, [eax + 0x10]
mov dword [ebp - 0x38], edi
jmp 0x10040c8e
mov ecx, dword [edi - 0x10]
test ecx, ecx
je 0x10040c72
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x10040c7e
call fcn.1000ca70
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
push eax
push dword [ebp - 0x58]
lea ecx, [ebp - 0x38]
push edi
call fcn.100104b0
mov edi, dword [ebp - 0x38]
lea eax, [ebp - 0x38]
mov byte [ebp - 4], 9
push eax
lea ecx, [ebp - 0x18]
call fcn.1001cb00
mov byte [ebp - 4], 5
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x10040e89
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x10040e89
lea edx, [eax - 0x10]
lea edi, [esi - 0x10]
mov dword [ebp - 0x34], edx
cmp edx, edi
je 0x10040d19
cmp dword [edi + 0xc], 0
lea esi, [edi + 0xc]
jl 0x10040d0a
mov ecx, dword [edx]
cmp ecx, dword [edi]
jne 0x10040d0a
push edx
call fcn.1000c300
add esp, 4
mov dword [ebp - 0x58], eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x10040d02
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x58]
lea esi, [eax + 0x10]
mov dword [ebp - 0x1c], esi
jmp 0x10040d19
push dword [eax - 0xc]
lea ecx, [ebp - 0x1c]
push eax
call fcn.1000d5b0
mov esi, dword [ebp - 0x1c]
movzx eax, word [esi]
mov edi, esi
push eax
call fcn.10110679
add esp, 4
test eax, eax
je 0x10040e01
nop
movzx eax, word [edi + 2]
add edi, 2
push eax
call fcn.10110679
add esp, 4
test eax, eax
jne 0x10040d30
cmp edi, esi
je 0x10040e01
mov edx, dword [esi - 0xc]
sub edi, esi
sar edi, 1
test edx, edx
js 0x10041101
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x10040d78
push edx
lea ecx, [ebp - 0x1c]
call fcn.1000af00
mov esi, dword [ebp - 0x1c]
mov eax, dword [esi - 0xc]
lea edx, [esi + edi*2]
sub eax, edi
mov dword [ebp - 0x58], eax
lea ecx, [eax*2 + 2]
test ecx, ecx
je 0x10040dd9
test edx, edx
jne 0x10040da9
call fcn.100ffec9
mov dword [eax], 0x16
call fcn.100ffda3
mov eax, 0x16
jmp 0x10040ddb
mov eax, dword [esi - 0xc]
lea eax, [eax*2 + 2]
cmp eax, ecx
jae 0x10040dce
call fcn.100ffec9
mov dword [eax], 0x22
call fcn.100ffda3
mov eax, 0x22
jmp 0x10040ddb
push ecx
push edx
push esi
call fcn.100e3d40
add esp, 0xc
xor eax, eax
push eax
call fcn.1000ded0
mov eax, dword [ebp - 0x58]
add esp, 4
test eax, eax
js 0x10041101
cmp eax, dword [esi - 8]
jg 0x10041101
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
movzx eax, word [esi]
xor edi, edi
mov dword [ebp - 0x58], esi
test ax, ax
je 0x10040e7a
mov ecx, eax
mov ebx, esi
push ecx
call fcn.10110679
add esp, 4
test eax, eax
je 0x10040e2a
test edi, edi
mov eax, ebx
cmovne eax, edi
mov edi, eax
jmp 0x10040e2c
xor edi, edi
movzx eax, word [ebx + 2]
add ebx, 2
mov ecx, eax
test ax, ax
jne 0x10040e12
mov ebx, dword [ebp - 0x2c]
test edi, edi
je 0x10040e7a
sub edi, esi
sar edi, 1
js 0x10041101
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x10040e68
push edi
lea ecx, [ebp - 0x1c]
call fcn.1000af00
mov esi, dword [ebp - 0x1c]
cmp edi, dword [esi - 8]
jg 0x10041101
xor eax, eax
mov dword [esi - 0xc], edi
mov word [esi + edi*2], ax
push 0
push 0x101539d4
lea ecx, [ebp - 0x18]
call fcn.1000d5b0
mov edi, dword [ebp - 0x18]
call fcn.1000ca70
mov ecx, eax
test ecx, ecx
je 0x100410ed
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x30]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 0xa
push eax
call fcn.1003dfe0
mov eax, dword [ebp - 0x28]
cmp dword [eax - 0xc], 0
je 0x10040ed2
push 1
push 0x1015589c
lea ecx, [ebp - 0x28]
call fcn.1002e880
push dword [edi - 0xc]
lea ecx, [ebp - 0x28]
push edi
call fcn.1002e880
lea eax, [esi - 0x10]
push eax
call fcn.1000c300
add eax, 0x10
add esp, 4
mov dword [ebp - 0x24], eax
mov ecx, dword [eax - 0xc]
mov byte [ebp - 4], 0xb
mov dword [ebp - 0x10], ecx
test ecx, ecx
js 0x10041101
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, dword [ebp - 0x10]
or ecx, edx
jge 0x10040f22
push dword [ebp - 0x10]
lea ecx, [ebp - 0x24]
call fcn.1000af00
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x10]
inc ecx
push ecx
push eax
call fcn.101003e2
mov eax, dword [ebp - 0x24]
add esp, 8
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [eax - 8]
jg 0x10041101
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [ebp - 0x24]
mov word [eax + ecx*2], dx
lea eax, [ebp - 0x24]
mov ecx, dword [ebp - 0x30]
push eax
lea eax, [ebp - 0x60]
push eax
lea ecx, [ecx + 0x8c]
call fcn.100414c0
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x64], eax
cmp eax, dword [ecx + 0x8c]
je 0x10040fc2
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x100410ed
mov edx, dword [ebp - 0x24]
mov bx, word [edx]
cmp bx, word [ecx]
mov ebx, dword [ebp - 0x2c]
jne 0x10040fb3
cmp word [edx], 0
je 0x10040faf
mov di, word [edx + 2]
cmp di, word [ecx + 2]
mov word [ebp - 0xe], di
mov edi, dword [ebp - 0x18]
jne 0x10040fb3
add edx, 4
add ecx, 4
cmp word [ebp - 0xe], 0
jne 0x10040f80
xor ecx, ecx
jmp 0x10040fb8
sbb ecx, ecx
or ecx, 1
shr ecx, 0x1f
test cl, cl
je 0x10040ffd
mov ecx, dword [ebp - 0x30]
lea eax, [ebp - 0x24]
mov dword [ebp - 0x58], eax
lea ecx, [ecx + 0x8c]
lea eax, [ebp - 0x11]
push eax
lea eax, [ebp - 0x58]
push eax
push 0x101572b8
call fcn.1003d220
mov ecx, dword [ebp - 0x30]
push eax
add eax, 0x10
push eax
push dword [ebp - 0x64]
lea eax, [ebp - 0x68]
push eax
lea ecx, [ecx + 0x8c]
call fcn.1003d430
mov eax, dword [ebp - 0x68]
lea ecx, [eax + 0x14]
lea eax, [ebp - 0x28]
push eax
call fcn.1001cb00
mov edx, dword [ebp - 0x24]
or eax, 0xffffffff
mov byte [ebp - 4], 0xa
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10041028
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x28]
or eax, 0xffffffff
mov byte [ebp - 4], 5
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10041047
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x34]
or eax, 0xffffffff
mov byte [ebp - 4], 3
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10041063
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x4c]
inc eax
mov dword [ebp - 0x4c], eax
cmp eax, dword [ebp - 0x50]
jl 0x10040570
push dword [ebp - 0x54]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov byte [ebp - 4], 2
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x10041098
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x100410b4
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, 1
or eax, 0xffffffff
jmp 0x100410c0
xor esi, esi
mov dword [ebp - 4], 0xffffffff
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x100410d9
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.1000aab0
push 0x80004005
call fcn.1000aab0
push 0x80070057
call fcn.1000aab0
int3