Function at 0x593d60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x60bd15
mov eax, dword fs:[0]
push eax
sub esp, 0x10c
mov eax, dword [0x667710]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x44], ecx
mov eax, dword [ebp + 8]
test eax, eax
je 0x59512a
cmp word [eax], 0
je 0x59512a
xor ebx, ebx
mov dword [ebp - 0x90], 0x1000
xorps xmm0, xmm0
mov dword [ebp - 0x84], ebx
xor esi, esi
movlpd qword [ebp - 0x98], xmm0
mov dword [ebp - 0x88], esi
mov dword [ebp - 0x80], ebx
push ebx
push 0x80
push 2
push ebx
push 1
push 0xc0000000
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0xa0], edi
cmp edi, 0xffffffff
je 0x5950a7
push 0x1000
push 8
mov dword [ebp - 0x9c], 0xc0000000
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 0x8c], esi
test esi, esi
je 0x593e2f
mov dword [ebp - 0x90], 0x1000
jmp 0x593e41
xor ebx, ebx
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x84], ebx
mov dword [ebp - 0x88], 0
test esi, esi
jne 0x593e6f
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xorps xmm0, xmm0
mov dword [ebp - 0x9c], esi
or edi, 0xffffffff
movlpd qword [ebp - 0x98], xmm0
jmp 0x5950a7
mov ebx, dword [ebp - 0x44]
mov ecx, ebx
push 1
call fcn.00596150
mov eax, dword [ebx + 0x1c]
lea ecx, [ebp - 0xa0]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x2c]
push 0x10
push eax
mov dword [ebp - 0x2c], 0x4c425454
mov dword [ebp - 0x28], 7
mov dword [ebp - 0x24], 0xffffffff
call fcn.0043bce1
cmp eax, 0x10
jne 0x595095
lea edx, [ebx + 0x10]
lea ecx, [ebp - 0xa0]
call fcn.00474080
test eax, eax
je 0x595095
mov edx, 0x673c0c
lea ecx, [ebp - 0xa0]
call fcn.00474080
test eax, eax
je 0x595095
mov edx, 0x673c10
lea ecx, [ebp - 0xa0]
call fcn.00474080
test eax, eax
je 0x595095
movss xmm3, dword [0x6457a0]
lea ecx, [ebp - 0x114]
movss xmm2, dword [0x6457c8]
sub esp, 0xc
mov dword [esp + 4], 0x40100000
call fcn.00474555
mov byte [ebp - 4], 1
xor edi, edi
mov eax, dword [ebx + 4]
mov dword [ebp - 0xc8], eax
mov dword [ebp - 0xc4], edi
test eax, eax
jle 0x594f01
or esi, 0xffffffff
nop dword [eax]
cmp edi, dword [ebx + 4]
jae 0x59514a
mov edi, dword [ebx]
mov eax, dword [ebp - 0xc4]
mov edi, dword [edi + eax*4]
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0xd0], edi
test edi, edi
je 0x593f65
lock inc dword [edi + 4]
test edi, edi
jne 0x593f72
mov byte [ebp - 4], 1
jmp 0x594ee8
push 0x6751f8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x2c]
cmp dword [eax - 0xc], 0
lea ecx, [eax - 0xc]
mov dword [ebp - 0x34], eax
jl 0x593f97
mov dword [ebp - 0x74], eax
lock inc dword [ecx]
jmp 0x59403c
mov edx, dword [0x668294]
mov dword [ebp - 0x74], edx
test eax, eax
jne 0x593fa8
xor ebx, ebx
jmp 0x593fb6
push eax
call fcn.00505bb3
mov edx, dword [ebp - 0x74]
add esp, 4
mov ebx, eax
cmp dword [edx - 0xc], 1
lea ecx, [edx - 0xc]
jg 0x593fc4
cmp ebx, dword [ecx + 8]
jle 0x594020
cmp ecx, 0x668010
je 0x593fe8
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x593fe0
push ecx
call fcn.0050524d
add esp, 4
mov eax, dword [0x668294]
mov dword [ebp - 0x74], eax
test ebx, ebx
jne 0x593ff3
mov eax, 0x668010
jmp 0x59401a
lea eax, [ebx*2 + 0xe]
push eax
call fcn.00505e8b
add esp, 4
test eax, eax
je 0x59403c
xor ecx, ecx
mov dword [eax], 1
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
mov word [eax + ebx*2 + 0xc], cx
lea edx, [eax + 0xc]
mov dword [ebp - 0x74], edx
lea esi, [ebx + ebx]
push esi
push dword [ebp - 0x34]
push edx
call fcn.004dd610
mov eax, dword [ebp - 0x74]
add esp, 0xc
xor ecx, ecx
mov dword [eax - 8], ebx
mov word [esi + eax], cx
mov esi, dword [edi + 0x30]
push 0x6751f8
mov dword [ebp - 0x70], esi
movzx ebx, si
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x74]
mov eax, dword [ecx - 8]
test eax, eax
jne 0x594066
or esi, 0xffffffff
jmp 0x594eb0
add eax, eax
lea ecx, [ebp - 0xa0]
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x38]
push 4
push eax
call fcn.0043bce1
cmp eax, 4
jne 0x595053
push dword [ebp - 0x38]
lea ecx, [ebp - 0xa0]
push dword [ebp - 0x74]
call fcn.0043bce1
xor ecx, ecx
mov edx, ebx
cmp eax, dword [ebp - 0x38]
sete cl
test ecx, ecx
je 0x595053
xor ecx, ecx
movzx eax, si
test dx, dx
mov dword [ebp - 0xcc], eax
mov eax, 1
cmovne ecx, eax
cmp dword [ebp + 0xc], 0
mov dword [ebp - 0x30], ecx
je 0x59414c
push edi
lea eax, [ebp - 0x34]
push eax
push edi
lea ecx, [ebp - 0x114]
call fcn.00474156
test al, al
je 0x59414c
push 4
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0xa0]
call fcn.0043bce1
cmp eax, 4
jne 0x595053
test byte [ebp - 0x30], 1
je 0x59411d
push 2
lea eax, [ebp - 0xcc]
push eax
lea ecx, [ebp - 0xa0]
call fcn.0043bce1
cmp eax, 2
jne 0x595053
push 4
lea eax, [ebp - 0xd8]
mov dword [ebp - 0xd8], 0
push eax
lea ecx, [ebp - 0xa0]
call fcn.0043bce1
cmp eax, 4
jne 0x595053
or esi, 0xffffffff
jmp 0x594ead
mov eax, dword [edi + 0x44]
cmp dword [eax - 0xc], 0
lea ecx, [eax - 0xc]
mov dword [ebp - 0x3c], eax
jl 0x59416e
mov esi, eax
mov dword [ebp - 0x68], esi
mov dword [ebp - 0xa4], esi
lock inc dword [ecx]
jmp 0x594234
mov esi, dword [0x668294]
mov dword [ebp - 0x68], esi
mov dword [ebp - 0xa4], esi
test eax, eax
jne 0x594188
xor ebx, ebx
mov dword [ebp - 0x34], ebx
jmp 0x594196
push eax
call fcn.00505bb3
add esp, 4
mov dword [ebp - 0x34], eax
mov ebx, eax
cmp dword [esi - 0xc], 1
lea ecx, [esi - 0xc]
jg 0x5941a7
mov dword [ebp - 0x38], esi
cmp ebx, dword [ecx + 8]
jle 0x594214
cmp ecx, 0x668010
je 0x5941d3
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x5941c4
push ecx
call fcn.0050524d
add esp, 4
mov esi, dword [0x668294]
mov dword [ebp - 0x68], esi
mov dword [ebp - 0xa4], esi
test ebx, ebx
jne 0x5941de
mov eax, 0x668010
jmp 0x594205
lea eax, [ebx*2 + 0xe]
push eax
call fcn.00505e8b
add esp, 4
test eax, eax
je 0x594234
xor ecx, ecx
mov dword [eax], 1
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
mov word [eax + ebx*2 + 0xc], cx
lea esi, [eax + 0xc]
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0xa4], esi
add ebx, ebx
push ebx
push dword [ebp - 0x3c]
push esi
call fcn.004dd610
mov eax, dword [ebp - 0x34]
mov ecx, esi
add esp, 0xc
mov dword [ecx - 8], eax
xor ecx, ecx
mov eax, dword [ebp - 0x38]
mov word [eax + ebx], cx
mov byte [ebp - 4], 4
cmp dword [esi - 8], 0
je 0x594245
or dword [ebp - 0x30], 0x100
push 0
lea eax, [ebp - 0xb0]
mov ecx, edi
push eax
call fcn.005bf504
mov eax, dword [ebp - 0xb0]
mov ecx, dword [ebp - 0x30]
cmp dword [eax - 8], 0
je 0x59426a
or ecx, 2
mov dword [ebp - 0x30], ecx
mov eax, dword [edi + 0x10]
mov dword [ebp - 0xdc], eax
test eax, eax
js 0x59427d
or ecx, 4
mov dword [ebp - 0x30], ecx
push 0x6751f8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [edi + 0xb8]
push 0x6751f8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0x30]
or ecx, 0x40
mov dword [ebp - 0xe0], esi
mov dword [ebp - 0x30], ecx
mov al, byte [edi + 0x28]
mov byte [ebp - 0x45], al
test al, al
je 0x5942bb
or ecx, 0x80
mov dword [ebp - 0x30], ecx
mov ecx, dword [edi + 0x8c]
cmp dword [ecx - 0xc], 0
lea eax, [ecx - 0xc]
mov dword [ebp - 0x3c], ecx
jl 0x5942e0
mov esi, ecx
mov dword [ebp - 0x64], esi
mov dword [ebp - 0xac], esi
lock inc dword [eax]
jmp 0x5943a6
mov esi, dword [0x668294]
mov dword [ebp - 0x64], esi
mov dword [ebp - 0xac], esi
test ecx, ecx
jne 0x5942fa
xor ebx, ebx
mov dword [ebp - 0x34], ebx
jmp 0x594308
push ecx
call fcn.00505bb3
add esp, 4
mov dword [ebp - 0x34], eax
mov ebx, eax
cmp dword [esi - 0xc], 1
lea ecx, [esi - 0xc]
jg 0x594319
mov dword [ebp - 0x38], esi
cmp ebx, dword [ecx + 8]
jle 0x594386
cmp ecx, 0x668010
je 0x594345
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x594336
push ecx
call fcn.0050524d
add esp, 4
mov esi, dword [0x668294]
mov dword [ebp - 0x64], esi
mov dword [ebp - 0xac], esi
test ebx, ebx
jne 0x594350
mov eax, 0x668010
jmp 0x594377
lea eax, [ebx*2 + 0xe]
push eax
call fcn.00505e8b
add esp, 4
test eax, eax
je 0x5943a6
xor ecx, ecx
mov dword [eax], 1
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
mov word [eax + ebx*2 + 0xc], cx
lea esi, [eax + 0xc]
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0xac], esi
add ebx, ebx
push ebx
push dword [ebp - 0x3c]
push esi
call fcn.004dd610
mov eax, dword [ebp - 0x34]
mov ecx, esi
add esp, 0xc
mov dword [ecx - 8], eax
xor ecx, ecx
mov eax, dword [ebp - 0x38]
mov word [eax + ebx], cx
cmp dword [esi - 8], 0
je 0x5943b3
or dword [ebp - 0x30], 0x200
mov ecx, dword [edi + 0x90]
cmp dword [ecx - 0xc], 0
lea eax, [ecx - 0xc]
mov dword [ebp - 0x3c], ecx
jl 0x5943d8
mov esi, ecx
mov dword [ebp - 0x60], esi
mov dword [ebp - 0xbc], esi
lock inc dword [eax]
jmp 0x59449e
mov esi, dword [0x668294]
mov dword [ebp - 0x60], esi
mov dword [ebp - 0xbc], esi
test ecx, ecx
jne 0x5943f2
xor ebx, ebx
mov dword [ebp - 0x34], ebx
jmp 0x594400
push ecx
call fcn.00505bb3
add esp, 4
mov dword [ebp - 0x34], eax
mov ebx, eax
cmp dword [esi - 0xc], 1
lea ecx, [esi - 0xc]
jg 0x594411
mov dword [ebp - 0x38], esi
cmp ebx, dword [ecx + 8]
jle 0x59447e
cmp ecx, 0x668010
je 0x59443d
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x59442e
push ecx
call fcn.0050524d
add esp, 4
mov esi, dword [0x668294]
mov dword [ebp - 0x60], esi
mov dword [ebp - 0xbc], esi
test ebx, ebx
jne 0x594448
mov eax, 0x668010
jmp 0x59446f
lea eax, [ebx*2 + 0xe]
push eax
call fcn.00505e8b
add esp, 4
test eax, eax
je 0x59449e
xor ecx, ecx
mov dword [eax], 1
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
mov word [eax + ebx*2 + 0xc], cx
lea esi, [eax + 0xc]
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0xbc], esi
add ebx, ebx
push ebx
push dword [ebp - 0x3c]
push esi
call fcn.004dd610
mov eax, dword [ebp - 0x34]
mov ecx, esi
add esp, 0xc
mov dword [ecx - 8], eax
xor ecx, ecx
mov eax, dword [ebp - 0x38]
mov word [eax + ebx], cx
cmp dword [esi - 8], 0
je 0x5944ab
or dword [ebp - 0x30], 0x400
mov ecx, dword [edi + 0x98]
cmp dword [ecx - 0xc], 0
lea eax, [ecx - 0xc]
mov dword [ebp - 0x3c], ecx
jl 0x5944d0
mov esi, ecx
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0xb8], esi
lock inc dword [eax]
jmp 0x594596
mov esi, dword [0x668294]
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0xb8], esi
test ecx, ecx
jne 0x5944ea
xor ebx, ebx
mov dword [ebp - 0x34], ebx
jmp 0x5944f8
push ecx
call fcn.00505bb3
add esp, 4
mov dword [ebp - 0x34], eax
mov ebx, eax
cmp dword [esi - 0xc], 1
lea ecx, [esi - 0xc]
jg 0x594509
mov dword [ebp - 0x38], esi
cmp ebx, dword [ecx + 8]
jle 0x594576
cmp ecx, 0x668010
je 0x594535
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x594526
push ecx
call fcn.0050524d
add esp, 4
mov esi, dword [0x668294]
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0xb8], esi
test ebx, ebx
jne 0x594540
mov eax, 0x668010
jmp 0x594567
lea eax, [ebx*2 + 0xe]
push eax
call fcn.00505e8b
add esp, 4
test eax, eax
je 0x594596
xor ecx, ecx
mov dword [eax], 1
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
mov word [eax + ebx*2 + 0xc], cx
lea esi, [eax + 0xc]
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0xb8], esi
add ebx, ebx
push ebx
push dword [ebp - 0x3c]
push esi
call fcn.004dd610
mov eax, dword [ebp - 0x34]
mov ecx, esi
add esp, 0xc
mov dword [ecx - 8], eax
xor ecx, ecx
mov eax, dword [ebp - 0x38]
mov word [eax + ebx], cx
cmp dword [esi - 8], 0
je 0x5945a3
or dword [ebp - 0x30], 0x800
mov ecx, dword [edi + 0x94]
cmp dword [ecx - 0xc], 0
lea eax, [ecx - 0xc]
mov dword [ebp - 0x3c], ecx
jl 0x5945c8
mov esi, ecx
mov dword [ebp - 0x58], esi
mov dword [ebp - 0xb4], esi
lock inc dword [eax]
jmp 0x59468e
mov esi, dword [0x668294]
mov dword [ebp - 0x58], esi
mov dword [ebp - 0xb4], esi
test ecx, ecx
jne 0x5945e2
xor ebx, ebx
mov dword [ebp - 0x34], ebx
jmp 0x5945f0
push ecx
call fcn.00505bb3
add esp, 4
mov dword [ebp - 0x34], eax
mov ebx, eax
cmp dword [esi - 0xc], 1
lea ecx, [esi - 0xc]
jg 0x594601
mov dword [ebp - 0x38], esi
cmp ebx, dword [ecx + 8]
jle 0x59466e
cmp ecx, 0x668010
je 0x59462d
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x59461e
push ecx
call fcn.0050524d
add esp, 4
mov esi, dword [0x668294]
mov dword [ebp - 0x58], esi
mov dword [ebp - 0xb4], esi
test ebx, ebx
jne 0x594638
mov eax, 0x668010
jmp 0x59465f
lea eax, [ebx*2 + 0xe]
push eax
call fcn.00505e8b
add esp, 4
test eax, eax
je 0x59468e
xor ecx, ecx
mov dword [eax], 1
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
mov word [eax + ebx*2 + 0xc], cx
lea esi, [eax + 0xc]
mov dword [ebp - 0x58], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0xb4], esi
add ebx, ebx
push ebx
push dword [ebp - 0x3c]
push esi
call fcn.004dd610
mov eax, dword [ebp - 0x34]
mov ecx, esi
add esp, 0xc
mov dword [ecx - 8], eax
xor ecx, ecx
mov eax, dword [ebp - 0x38]
mov word [eax + ebx], cx
cmp dword [esi - 8], 0
je 0x59469b
or dword [ebp - 0x30], 0x1000
mov ecx, dword [edi + 0x9c]
cmp dword [ecx - 0xc], 0
lea eax, [ecx - 0xc]
mov dword [ebp - 0x50], ecx
jl 0x5946bd
mov esi, ecx
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x3c], esi
lock inc dword [eax]
jmp 0x59477a
mov esi, dword [0x668294]
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x3c], esi
test ecx, ecx
jne 0x5946d4
xor ebx, ebx
mov dword [ebp - 0x34], ebx
jmp 0x5946e2
push ecx
call fcn.00505bb3
add esp, 4
mov dword [ebp - 0x34], eax
mov ebx, eax
cmp dword [esi - 0xc], 1
lea ecx, [esi - 0xc]
jg 0x5946f3
mov dword [ebp - 0x38], esi
cmp ebx, dword [ecx + 8]
jle 0x59475a
cmp ecx, 0x668010
je 0x59471c
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x594710
push ecx
call fcn.0050524d
add esp, 4
mov esi, dword [0x668294]
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x3c], esi
test ebx, ebx
jne 0x594727
mov eax, 0x668010
jmp 0x59474e
lea eax, [ebx*2 + 0xe]
push eax
call fcn.00505e8b
add esp, 4
test eax, eax
je 0x59477a
xor ecx, ecx
mov dword [eax], 1
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
mov word [eax + ebx*2 + 0xc], cx
lea esi, [eax + 0xc]
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x3c], esi
add ebx, ebx
push ebx
push dword [ebp - 0x50]
push esi
call fcn.004dd610
mov eax, dword [ebp - 0x34]
mov ecx, esi
add esp, 0xc
mov dword [ecx - 8], eax
xor ecx, ecx
mov eax, dword [ebp - 0x38]
mov word [eax + ebx], cx
cmp dword [esi - 8], 0
je 0x594787
or dword [ebp - 0x30], 0x2000
mov ebx, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x6751f8
call ebx
mov esi, dword [edi + 0x38]
push 0x6751f8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
movzx eax, si
mov dword [ebp - 0xa8], eax
mov eax, dword [0x668294]
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x50], eax
mov byte [ebp - 4], 0xb
xor eax, eax
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
cmp dword [0x673bfc], eax
jne 0x5947e1
cmp dword [edi + 0x28], eax
je 0x594a12
mov eax, dword [edi + 0x1c]
or dword [ebp - 0x30], 8
push 0x6751f8
mov dword [ebp - 0x6c], eax
call ebx
mov ecx, dword [edi + 8]
cmp dword [ecx - 0xc], 0
lea eax, [ecx - 0xc]
mov dword [ebp - 0x38], ecx
jl 0x59480b
mov esi, ecx
lock inc dword [eax]
jmp 0x5948ab
mov esi, dword [0x668294]
test ecx, ecx
jne 0x59481c
xor ebx, ebx
mov dword [ebp - 0x34], ebx
jmp 0x59482a
push ecx
call fcn.00505bb3
add esp, 4
mov dword [ebp - 0x34], eax
mov ebx, eax
cmp dword [esi - 0xc], 1
lea ecx, [esi - 0xc]
jg 0x594838
cmp ebx, dword [ecx + 8]
jle 0x594890
cmp ecx, 0x668010
je 0x59485b
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x594855
push ecx
call fcn.0050524d
add esp, 4
mov esi, dword [0x668294]
test ebx, ebx
jne 0x594866
mov eax, 0x668010
jmp 0x59488d
lea eax, [ebx*2 + 0xe]
push eax
call fcn.00505e8b
add esp, 4
test eax, eax
je 0x5948ab
xor ecx, ecx
mov dword [eax], 1
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
mov word [eax + ebx*2 + 0xc], cx
lea esi, [eax + 0xc]
add ebx, ebx
push ebx
push dword [ebp - 0x38]
push esi
call fcn.004dd610
mov eax, dword [ebp - 0x34]
add esp, 0xc
mov dword [esi - 8], eax
xor eax, eax
mov word [ebx + esi], ax
push 0x6751f8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x40]
cmp eax, esi
je 0x594999
mov edx, dword [eax - 0xc]
lea ecx, [eax - 0xc]
test edx, edx
jns 0x5948d3
cmp ecx, 0x668010
jne 0x5948e0
cmp dword [esi - 0xc], 0
lea ebx, [esi - 0xc]
jge 0x594971
mov ebx, dword [esi - 8]
mov dword [ebp - 0x34], ebx
cmp edx, 1
jg 0x5948f0
cmp ebx, dword [ecx + 8]
jle 0x594953
cmp ecx, 0x668010
je 0x594918
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x59490d
push ecx
call fcn.0050524d
add esp, 4
mov eax, dword [0x668294]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x50], eax
test ebx, ebx
jne 0x594923
mov eax, 0x668010
jmp 0x59494a
lea eax, [ebx*2 + 0xe]
push eax
call fcn.00505e8b
add esp, 4
test eax, eax
je 0x594999
xor ecx, ecx
mov dword [eax], 1
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
mov word [eax + ebx*2 + 0xc], cx
add eax, 0xc
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x50], eax
add ebx, ebx
push ebx
push esi
push eax
call fcn.004dd610
mov eax, dword [ebp - 0x40]
add esp, 0xc
mov ecx, dword [ebp - 0x34]
mov dword [eax - 8], ecx
xor ecx, ecx
mov word [ebx + eax], cx
jmp 0x594999
cmp ecx, 0x668010
je 0x59498e
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x59498e
push ecx
call fcn.0050524d
add esp, 4
mov eax, esi
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x50], eax
lock inc dword [ebx]
add esi, 0xfffffff4
cmp esi, 0x668010
je 0x5949b9
or eax, 0xffffffff
lock xadd dword [esi], eax
dec eax
test eax, eax
jg 0x5949b9
push esi
call fcn.0050524d
add esp, 4
mov ecx, dword [edi + 0x14]
mov dword [ebp - 0x1c], ecx
movzx eax, word [edi + 0xc]
mov word [ebp - 0x18], ax
mov esi, eax
movzx eax, word [edi + 0xe]
mov word [ebp - 0x16], ax
mov ebx, eax
mov eax, dword [ebp - 0x40]
mov edx, dword [edi + 0x18]
mov dword [ebp - 0x14], edx
cmp dword [eax - 8], 0
jne 0x5949f9
test ecx, ecx
jne 0x5949f9
test si, si
jne 0x5949f9
test bx, bx
jne 0x5949f9
test edx, edx
jne 0x5949f9
mov eax, dword [ebp - 0x30]
jmp 0x594a02
mov eax, dword [ebp - 0x30]
or eax, 0x10
mov dword [ebp - 0x30], eax
cmp word [ebp - 0xa8], 0
je 0x594a12
or eax, 0x20
mov dword [ebp - 0x30], eax
push 4
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0xa0]
call fcn.0043bce1
cmp eax, 4
jne 0x594f3a
mov eax, dword [ebp - 0x30]
test al, 1
je 0x594a53
push 2
lea eax, [ebp - 0xcc]
push eax
lea ecx, [ebp - 0xa0]
call fcn.0043bce1
cmp eax, 2
jne 0x594f3a
mov eax, dword [ebp - 0x30]
test eax, 0x100
je 0x594a76
lea edx, [ebp - 0xa4]
lea ecx, [ebp - 0xa0]
call fcn.00474080
test eax, eax
je 0x594f3a
mov eax, dword [ebp - 0x30]
test al, 2
je 0x594a96
lea edx, [ebp - 0xb0]
lea ecx, [ebp - 0xa0]
call fcn.00474080
test eax, eax
je 0x594f3a
mov eax, dword [ebp - 0x30]
test al, 4
je 0x594aba
push 4
lea eax, [ebp - 0xdc]
push eax
lea ecx, [ebp - 0xa0]
call fcn.0043bce1
cmp eax, 4
jne 0x594f3a
mov eax, dword [ebp - 0x30]
test al, 8
je 0x594adb
push 4
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp - 0xa0]
call fcn.0043bce1
cmp eax, 4
jne 0x594f3a
mov eax, dword [ebp - 0x30]
test al, 0x10
je 0x594b12
lea edx, [ebp - 0x50]
lea ecx, [ebp - 0xa0]
call fcn.00474080
test eax, eax
je 0x594f3a
push 0xc
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0xa0]
call fcn.0043bce1
cmp eax, 0xc
jne 0x594f3a
mov eax, dword [ebp - 0x30]
test al, 0x20
je 0x594c82
push 2
lea eax, [ebp - 0xa8]
push eax
lea ecx, [ebp - 0xa0]
call fcn.0043bce1
cmp eax, 2
jne 0x594f3a
xor eax, eax
xor ebx, ebx
cmp ax, word [ebp - 0xa8]
jge 0x594c7f
mov dword [ebp - 0xd4], 0x6751f8
mov esi, dword [0x668294]
mov dword [ebp - 0x34], esi
mov edi, esi
mov dword [ebp - 0x38], edi
push 0x6751f8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 4], 0xe
test ebx, ebx
js 0x594bb8
mov eax, dword [ebp - 0x4c]
cmp ebx, dword [eax + 0x38]
jge 0x594bb8
jae 0x59514a
mov esi, eax
lea edi, [ebx*8]
lea ecx, [ebp - 0x34]
mov eax, dword [esi + 0x34]
add eax, edi
push eax
call fcn.0040cd2a
cmp ebx, dword [esi + 0x38]
jae 0x59514a
mov eax, dword [esi + 0x34]
lea ecx, [ebp - 0x38]
add eax, 4
add eax, edi
push eax
call fcn.0040d242
mov esi, dword [ebp - 0x34]
mov edi, dword [ebp - 0x38]
push 0x6751f8
mov byte [ebp - 4], 0xd
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esi - 8]
lea ecx, [ebp - 0xa0]
mov dword [ebp - 0xc0], eax
lea eax, [ebp - 0xc0]
push 4
push eax
call fcn.0043bce1
cmp eax, 4
jne 0x594f2a
push dword [ebp - 0xc0]
lea ecx, [ebp - 0xa0]
push esi
call fcn.0043bce1
xor ecx, ecx
cmp eax, dword [ebp - 0xc0]
sete cl
test ecx, ecx
je 0x594f2a
lea edx, [ebp - 0x38]
lea ecx, [ebp - 0xa0]
call fcn.00474080
test eax, eax
je 0x594f2a
add edi, 0xfffffff4
cmp edi, 0x668010
je 0x594c48
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x594c48
push edi
call fcn.0050524d
add esp, 4
add esi, 0xfffffff4
mov byte [ebp - 4], 0xb
cmp esi, 0x668010
je 0x594c6c
or eax, 0xffffffff
lock xadd dword [esi], eax
dec eax
test eax, eax
jg 0x594c6c
push esi
call fcn.0050524d
add esp, 4
movsx eax, word [ebp - 0xa8]
inc ebx
cmp ebx, eax
jl 0x594b52
mov edi, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x30]
test al, 0x40
je 0x594ca6
push 4
lea eax, [ebp - 0xe0]
push eax
lea ecx, [ebp - 0xa0]
call fcn.0043bce1
cmp eax, 4
jne 0x594f3a
mov eax, dword [ebp - 0x30]
test al, al
jns 0x594cc4
push 1
lea eax, [ebp - 0x45]
push eax
lea ecx, [ebp - 0xa0]
call fcn.0043bce1
cmp eax, 1
jne 0x594f3a
push 4
lea eax, [ebp - 0xe4]
mov dword [ebp - 0xe4], 0
push eax
lea ecx, [ebp - 0xa0]
call fcn.0043bce1
cmp eax, 4
jne 0x594f3a
mov eax, dword [ebp - 0x30]
test eax, 0x200
je 0x594d11
lea edx, [ebp - 0xac]
lea ecx, [ebp - 0xa0]
call fcn.00474080
test eax, eax
je 0x594f3a
mov eax, dword [ebp - 0x30]
test eax, 0x400
je 0x594d34
lea edx, [ebp - 0xbc]
lea ecx, [ebp - 0xa0]
call fcn.00474080
test eax, eax
je 0x594f3a
mov eax, dword [ebp - 0x30]
test eax, 0x800
je 0x594d57
lea edx, [ebp - 0xb8]
lea ecx, [ebp - 0xa0]
call fcn.00474080
test eax, eax
je 0x594f3a
mov eax, dword [ebp - 0x30]
test eax, 0x1000
je 0x594d7a
lea edx, [ebp - 0xb4]
lea ecx, [ebp - 0xa0]
call fcn.00474080
test eax, eax
je 0x594f3a
mov eax, dword [ebp - 0x30]
test eax, 0x2000
je 0x594d97
lea edx, [ebp - 0x3c]
lea ecx, [ebp - 0xa0]
call fcn.00474080
test eax, eax
je 0x594f3a
mov ecx, dword [ebp - 0x40]
or esi, 0xffffffff
add ecx, 0xfffffff4
cmp ecx, 0x668010
je 0x594dbc
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x594dbc
push ecx
call fcn.0050524d
add esp, 4
mov ecx, dword [ebp - 0x54]
add ecx, 0xfffffff4
cmp ecx, 0x668010
je 0x594dde
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x594dde
push ecx
call fcn.0050524d
add esp, 4
mov ecx, dword [ebp - 0x58]
add ecx, 0xfffffff4
cmp ecx, 0x668010
je 0x594e00
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x594e00
push ecx
call fcn.0050524d
add esp, 4
mov ecx, dword [ebp - 0x5c]
add ecx, 0xfffffff4
cmp ecx, 0x668010
je 0x594e22
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x594e22
push ecx
call fcn.0050524d
add esp, 4
mov ecx, dword [ebp - 0x60]
add ecx, 0xfffffff4
cmp ecx, 0x668010
je 0x594e44
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x594e44
push ecx
call fcn.0050524d
add esp, 4
mov ecx, dword [ebp - 0x64]
add ecx, 0xfffffff4
cmp ecx, 0x668010
je 0x594e66
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x594e66
push ecx
call fcn.0050524d
add esp, 4
mov ecx, dword [ebp - 0xb0]
add ecx, 0xfffffff4
cmp ecx, 0x668010
je 0x594e8b
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x594e8b
push ecx
call fcn.0050524d
add esp, 4
mov ecx, dword [ebp - 0x68]
add ecx, 0xfffffff4
cmp ecx, 0x668010
je 0x594ead
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x594ead
push ecx
call fcn.0050524d
add esp, 4
mov ecx, dword [ebp - 0x74]
add ecx, 0xfffffff4
cmp ecx, 0x668010
je 0x594ecf
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x594ecf
push ecx
call fcn.0050524d
add esp, 4
mov eax, esi
mov byte [ebp - 4], 1
lock xadd dword [edi + 4], eax
dec eax
jne 0x594ee5
mov eax, dword [edi]
mov ecx, edi
push 1
call dword [eax]
mov ebx, dword [ebp - 0x44]
mov edi, dword [ebp - 0xc4]
inc edi
mov dword [ebp - 0xc4], edi
cmp edi, dword [ebp - 0xc8]
jl 0x593f40
mov dword [ebp - 0x34], 1
lea ecx, [ebp - 0x114]
call fcn.0047462c
mov ebx, dword [ebp - 0x84]
mov esi, dword [ebp - 0x8c]
mov edi, dword [ebp - 0xa0]
jmp 0x5950ae
lea ecx, [ebp - 0x38]
call fcn.0040d2dc
lea ecx, [ebp - 0x34]
call fcn.0040cd7c
mov ecx, dword [ebp - 0x40]
or ebx, 0xffffffff
add ecx, 0xfffffff4
cmp ecx, 0x668010
je 0x594f5f
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x594f5f
push ecx
call fcn.0050524d
add esp, 4
mov ecx, dword [ebp - 0x54]
add ecx, 0xfffffff4
cmp ecx, 0x668010
je 0x594f81
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x594f81
push ecx
call fcn.0050524d
add esp, 4
mov ecx, dword [ebp - 0x58]
add ecx, 0xfffffff4
cmp ecx, 0x668010
je 0x594fa3
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x594fa3
push ecx
call fcn.0050524d
add esp, 4
mov ecx, dword [ebp - 0x5c]
add ecx, 0xfffffff4
cmp ecx, 0x668010
je 0x594fc5
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x594fc5
push ecx
call fcn.0050524d
add esp, 4
mov ecx, dword [ebp - 0x60]
add ecx, 0xfffffff4
cmp ecx, 0x668010
je 0x594fe7
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x594fe7
push ecx
call fcn.0050524d
add esp, 4
mov ecx, dword [ebp - 0x64]
add ecx, 0xfffffff4
cmp ecx, 0x668010
je 0x595009
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x595009
push ecx
call fcn.0050524d
add esp, 4
mov ecx, dword [ebp - 0xb0]
add ecx, 0xfffffff4
cmp ecx, 0x668010
je 0x59502e
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x59502e
push ecx
call fcn.0050524d
add esp, 4
mov ecx, dword [ebp - 0x68]
add ecx, 0xfffffff4
cmp ecx, 0x668010
je 0x595050
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x595050
push ecx
call fcn.0050524d
add esp, 4
mov edi, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x74]
add ecx, 0xfffffff4
cmp ecx, 0x668010
je 0x595076
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x595076
push ecx
call fcn.0050524d
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi + 4], eax
dec eax
jne 0x595089
mov eax, dword [edi]
mov ecx, edi
push 1
call dword [eax]
mov dword [ebp - 0x34], 0
jmp 0x594f08
mov ebx, dword [ebp - 0x84]
mov esi, dword [ebp - 0x8c]
mov edi, dword [ebp - 0xa0]
mov dword [ebp - 0x34], 0
cmp dword [ebp - 0x80], 0
je 0x595105
test esi, esi
je 0x595119
test ebx, ebx
je 0x595105
mov eax, dword [ebp - 0x94]
push 0
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x6c]
push eax
push dword [ebp - 0x98]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x595105
xor edx, edx
or edx, eax
and edx, dword [ebp - 0x6c]
cmp edx, 0xffffffff
je 0x595105
push 0
lea eax, [ebp - 0xc8]
mov dword [ebp - 0xc8], 0
push eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test esi, esi
je 0x595119
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp edi, 0xffffffff
je 0x595125
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x34]
jmp 0x59512c
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004da623
mov esp, ebp
pop ebp
ret 8
push 0x80070057
call fcn.004021b5
int3