Function at 0x402840
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56bddb
mov eax, dword fs:[0]
push eax
mov eax, 0x1028
call fcn.0054b810
mov eax, dword [0x5cefd4]
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 edi, ecx
call fcn.0040879e
mov ecx, eax
test ecx, ecx
je 0x402d24
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x101c], esi
mov dword [ebp - 4], 0
mov eax, dword [edi + 4]
mov dword [ebp - 0x1028], 0
test eax, eax
je 0x402ce3
push eax
call fcn.0055481c
add esp, 4
cmp eax, 0x100
jl 0x402cbe
push 1
push 0xfffffffffffffffc
push dword [edi + 4]
call fcn.00550ba6
push dword [edi + 4]
lea eax, [ebp - 0x1030]
push 1
push 4
push eax
call fcn.005549f3
add esp, 0x1c
cmp eax, 1
jne 0x402cbe
cmp dword [ebp - 0x1030], 0
jl 0x402cbe
push eax
push 0xfffffffffffffffc
push dword [edi + 4]
call fcn.00550ba6
push 1
push 0xfffffffffffffffc
push dword [edi + 4]
call fcn.00550ba6
push dword [edi + 4]
lea eax, [ebp - 0x1014]
push 1
push 4
push eax
call fcn.005549f3
add esp, 0x28
cmp eax, 1
jne 0x402977
cmp dword [ebp - 0x1014], eax
jl 0x402977
push eax
push 0xfffffffffffffffc
push dword [edi + 4]
call fcn.00550ba6
push 1
push 0xfffffffffffffffc
push dword [edi + 4]
call fcn.00550ba6
push dword [edi + 4]
lea eax, [ebp - 0x1024]
push 1
push 4
push eax
call fcn.005549f3
add esp, 0x28
cmp eax, 1
jne 0x402977
mov eax, dword [ebp - 0x1024]
test eax, eax
js 0x402977
inc eax
cmp eax, 0x1000
jl 0x402983
mov ecx, edi
call fcn.00401cf0
jmp 0x402ce3
push 1
push 0xfffffffffffffffc
push dword [edi + 4]
call fcn.00550ba6
mov eax, dword [ebp - 0x1024]
push 1
neg eax
push eax
push dword [edi + 4]
call fcn.00550ba6
push dword [edi + 4]
lea eax, [ebp - 0x1010]
push 1
push dword [ebp - 0x1024]
push eax
call fcn.005549f3
add esp, 0x28
cmp eax, 1
je 0x4029cd
mov ecx, edi
call fcn.00401cf0
jmp 0x402ce3
mov eax, dword [ebp - 0x1024]
push 1
neg eax
push eax
push dword [edi + 4]
call fcn.00550ba6
mov eax, dword [ebp - 0x1024]
add esp, 0xc
cmp eax, 0x1000
jae 0x402d33
mov ecx, dword [edi + 8]
add esi, 0xfffffff0
mov byte [ebp + eax - 0x1010], 0
lea edx, [ecx - 0x10]
cmp edx, esi
je 0x402a5b
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x402a4c
mov eax, dword [edx]
cmp eax, dword [esi]
jne 0x402a4c
push edx
call fcn.00403e90
add esp, 4
mov dword [ebp - 0x102c], eax
or ecx, 0xffffffff
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x402a41
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x102c]
add eax, 0x10
mov dword [ebp - 0x101c], eax
jmp 0x402a5b
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x101c]
call fcn.00403c90
lea eax, [ebp - 0x1010]
push eax
lea ecx, [ebp - 0x101c]
call fcn.00402f70
mov esi, dword [ebp - 0x101c]
push ecx
mov ecx, dword [esi - 0x10]
lea ebx, [esi - 0x10]
mov byte [ebp - 0x1015], 0
mov dword [ebp - 0x1034], esp
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [ebx + 0xc], 0
lea ecx, [ebx + 0xc]
mov edx, eax
mov dword [ebp - 0x1020], ecx
jl 0x402aa8
cmp edx, dword [ebx]
jne 0x402aa8
mov eax, ebx
lock inc dword [ecx]
jmp 0x402ae5
mov eax, dword [edx]
mov ecx, edx
push 2
push dword [ebx + 4]
call dword [eax]
mov ecx, eax
mov dword [ebp - 0x102c], ecx
test ecx, ecx
je 0x402d2e
mov eax, dword [ebx + 4]
mov dword [ecx + 4], eax
lea eax, [ebx + 0x10]
mov edx, dword [ebx + 4]
inc edx
push edx
push eax
push edx
lea eax, [ecx + 0x10]
push eax
call fcn.00403f00
mov eax, dword [ebp - 0x102c]
add esp, 0x10
mov edx, dword [ebp - 0x1034]
add eax, 0x10
mov cl, byte [ebp - 0x1015]
mov dword [edx], eax
call fcn.004042e0
add esp, 4
test al, al
jne 0x402b32
mov ecx, edi
call fcn.00401cf0
mov ecx, dword [ebp - 0x1020]
or eax, 0xffffffff
mov byte [edi + 0x10], 1
mov dword [ebp - 4], 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x402d06
mov ecx, dword [ebx]
push ebx
jmp 0x402d01
cmp dword [edi + 0x14], 0
mov eax, dword [ebp - 0x1030]
mov dword [edi + 0xc], eax
jne 0x402b49
test eax, eax
jle 0x402b49
inc eax
mov dword [edi + 0x14], eax
cmp dword [ebx + 0xc], 1
jle 0x402b63
push dword [ebx + 4]
lea ecx, [ebp - 0x101c]
call fcn.00403f90
mov esi, dword [ebp - 0x101c]
mov ecx, esi
call fcn.004047f0
mov ebx, eax
lea eax, [ebp - 0x1028]
push 0x5ad848
push ebx
push eax
call fcn.005508a5
add esp, 0xc
mov dword [ebp - 0x1020], eax
test ebx, ebx
je 0x402b9a
push ebx
call fcn.0040847a
mov eax, dword [ebp - 0x1020]
add esp, 4
test eax, eax
jne 0x402ce3
cmp dword [ebp - 0x1028], eax
je 0x402ce3
mov eax, dword [ebp - 0x1014]
mov bl, 1
neg eax
push 1
push eax
push dword [edi + 4]
mov dword [ebp - 0x1020], eax
call fcn.00550ba6
mov eax, dword [ebp - 0x1014]
add esp, 0xc
test eax, eax
jle 0x402c76
nop word [eax + eax]
push dword [edi + 4]
push 1
cmp eax, 0x1000
jl 0x402c12
lea eax, [ebp - 0x1010]
push 0x1000
push eax
call fcn.005549f3
add esp, 0x10
cmp eax, 1
jne 0x402c6d
mov eax, 0x1000
sub dword [ebp - 0x1014], eax
jmp 0x402c37
push eax
lea eax, [ebp - 0x1010]
push eax
call fcn.005549f3
add esp, 0x10
cmp eax, 1
jne 0x402c6d
mov eax, dword [ebp - 0x1014]
mov dword [ebp - 0x1014], 0
push dword [ebp - 0x1028]
push 1
push eax
lea eax, [ebp - 0x1010]
push eax
call fcn.00554d5c
add esp, 0x10
cmp eax, 1
jne 0x402c60
mov eax, dword [ebp - 0x1014]
test eax, eax
jg 0x402be0
jmp 0x402c76
mov ecx, edi
call fcn.00401cf0
mov byte [edi + 0x10], 1
jmp 0x402c74
mov ecx, edi
call fcn.00401cf0
xor bl, bl
push dword [ebp - 0x1028]
call fcn.0055028e
add esp, 4
test bl, bl
je 0x402c9b
push 1
push dword [ebp - 0x1020]
push dword [edi + 4]
call fcn.00550ba6
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x402cba
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, bl
jmp 0x402d08
mov eax, dword [edi + 4]
mov dword [edi + 0xc], 0
mov dword [edi + 0x14], 0
test eax, eax
je 0x402ce3
push eax
call fcn.0055028e
add esp, 4
mov dword [edi + 4], 0
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
add esi, 0xfffffff0
mov byte [edi + 0x10], 1
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x402d06
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
xor al, al
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.0054aef3
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00404240
call fcn.00404010
call fcn.0054b034
int3