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

Disassembly:
push 0xffffffffffffffff
push 0x409926
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x168
mov eax, dword [esp + 0x178]
push eax
lea ecx, [esp + 0x10]
call fcn.00402ec0
push str.worker.dat
push eax
lea ecx, [esp + 0x10]
push ecx
mov dword [esp + 0x17c], 0
call fcn.00404a60
add esp, 0xc
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
mov byte [esp + 0x170], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405c70
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push ebx
mov ebx, dword [esp + 0xc]
push esi
mov esi, dword [sym.imp.MSVCR70.dll_fopen]
push edi
push 0x40b1a0
push ebx
call esi
mov edi, eax
add esp, 8
mov dword [esp + 0x10], edi
xor eax, eax
mov cl, byte [eax + 0x40acd9]
test cl, cl
je 0x405cb5
mov dl, byte [eax + 0x40acd8]
mov byte [esp + eax + 0x1c], cl
mov cl, byte [eax + 0x40acda]
mov byte [esp + eax + 0x1d], dl
add eax, 2
test cl, cl
jne 0x405c90
test edi, edi
mov dword [esp + eax + 0x1c], 0x1a0a0d
je 0x405e4f
lea eax, [esp + 0x1c]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405cd0
push ebp
mov ebp, dword [sym.imp.MSVCR70.dll_fread]
sub eax, edx
push edi
inc eax
push 1
push eax
lea eax, [esp + 0x7c]
push eax
call ebp
add esp, 0x10
cmp eax, 1
jne 0x405e42
lea esi, [esp + 0x20]
lea eax, [esp + 0x70]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x405d24
test cl, cl
je 0x405d20
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x405d24
add eax, 2
add esi, 2
test cl, cl
jne 0x405d00
xor eax, eax
jmp 0x405d29
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x405e42
push edi
push 1
lea eax, [esp + 0x18]
push 2
push eax
call ebp
add esp, 0x10
cmp eax, 1
jne 0x405e42
cmp word [esp + 0x10], ax
jne 0x405e42
push edi
push eax
lea ecx, [esp + 0x78]
push 0x94
push ecx
call ebp
add esp, 0x10
cmp eax, 1
jne 0x405e42
mov ebx, dword [esp + 0x18c]
jmp 0x405d80
lea edi, [esp + 0x104]
mov ecx, 0x14
lea esi, [esp + 0x70]
call fcn.00403550
lea edx, [esp + 0x114]
push edx
lea eax, [esp + 0x88]
call fcn.00403590
lea eax, [esp + 0x130]
push eax
lea eax, [esp + 0xac]
call fcn.00403590
add esp, 8
lea edi, [esp + 0x144]
mov ecx, 8
lea esi, [esp + 0xc4]
call fcn.00403550
lea edi, [esp + 0x148]
mov ecx, 0x24
lea esi, [esp + 0xcc]
call fcn.00403550
lea edi, [esp + 0x168]
mov ecx, 0x14
lea esi, [esp + 0xf0]
call fcn.00403550
mov eax, dword [ebx + 8]
lea ecx, [esp + 0x104]
push ecx
push eax
mov ecx, ebx
call fcn.00403e70
mov edx, dword [esp + 0x14]
push edx
push 1
lea eax, [esp + 0x78]
push 0x94
push eax
call ebp
add esp, 0x10
cmp eax, 1
je 0x405d80
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
push edi
call dword [sym.imp.MSVCR70.dll_fclose]
add esp, 4
pop ebp
jmp 0x405eab
call dword [sym.imp.MSVCR70.dll__errno]
cmp dword [eax], 2
jne 0x405eab
push 0x40b19c
push ebx
call esi
mov esi, eax
add esp, 8
test esi, esi
je 0x405eab
lea eax, [esp + 0x1c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405e72
mov edi, dword [sym.imp.MSVCR70.dll_fwrite]
sub eax, edx
push esi
inc eax
push eax
lea ecx, [esp + 0x24]
push 1
push ecx
call edi
push esi
push 1
lea edx, [esp + 0x24]
push 2
push edx
mov dword [esp + 0x2c], 1
call edi
push esi
call dword [sym.imp.MSVCR70.dll_fclose]
add esp, 0x24
lea eax, [ebx - 0x10]
mov dword [esp + 0x17c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
pop edi
pop esi
pop ebx
jg 0x405ed3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x168]
mov dword fs:[0], ecx
add esp, 0x174
ret