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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x43a1d0
mov eax, dword fs:[0]
push eax
sub esp, 0x58
push ebx
push esi
push edi
mov eax, dword [0x44a5d0]
xor eax, esp
push eax
lea eax, [esp + 0x68]
mov dword fs:[0], eax
xor edi, edi
mov dword [esp + 0x24], edi
call fcn.004123f8
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40417c
push 0x80004005
call fcn.004052a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebx, [eax + 0x10]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x70], edi
mov eax, dword [ebx - 8]
mov ecx, 1
sub ecx, dword [ebx - 4]
sub eax, 0x100
or eax, ecx
jge 0x4041b6
push 0x100
lea ecx, [esp + 0x1c]
call fcn.00405650
mov ebx, dword [esp + 0x18]
push 0x100
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x440bd4
push ebx
mov dword [esp + 0x28], edi
call fcn.00422837
mov esi, eax
add esp, 8
cmp esi, edi
jne 0x404225
mov esi, dword [ebp + 0xc]
push 0x441128
mov ecx, esi
call fcn.00405800
mov dword [esp + 0x70], 0xffffffff
lea eax, [ebx - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40420e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea ecx, [esp + 0x34]
push ecx
push ebx
call fcn.00422f02
mov edx, dword [esp + 0x50]
lea eax, [esp + 0x34]
push eax
add edx, 0xfffffffc
push esi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], edi
call fcn.004228a5
push esi
push 1
lea ecx, [esp + 0x38]
push 4
push ecx
call fcn.00422b83
mov edx, dword [esp + 0x40]
lea eax, [esp + 0x4c]
push eax
push esi
mov dword [esp + 0x54], edx
mov dword [esp + 0x58], edi
call fcn.004228a5
push esi
push 1
lea ecx, [esp + 0x4c]
push 4
push ecx
call fcn.00422b83
mov edx, dword [esp + 0x54]
add edx, 1
push edx
call fcn.00422bed
mov edi, eax
mov eax, dword [esp + 0x58]
push esi
push eax
push 1
push edi
call fcn.00422b83
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x68]
add esp, 0x4c
push edi
add eax, 0x1bc
push 0x440bd0
push eax
mov byte [edi + ecx], 0
call fcn.00405760
push edi
call fcn.00422cb0
push esi
push 1
lea edx, [esp + 0x2c]
push 4
push edx
call fcn.00422b83
mov eax, dword [esp + 0x34]
add eax, 1
push eax
call fcn.00422bed
mov ecx, dword [esp + 0x38]
push esi
push ecx
mov edi, eax
push 1
push edi
call fcn.00422b83
mov edx, dword [esp + 0x48]
push esi
mov byte [edi + edx], 0
call fcn.00422db0
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x98]
add esi, 0x98
push 0x5c
push eax
call fcn.004222a9
add esp, 0x40
test eax, eax
jne 0x40431e
or eax, 0xffffffff
jmp 0x404320
sub eax, dword [esi]
add eax, 1
push eax
lea eax, [esp + 0x14]
push eax
mov ecx, esi
call fcn.00404ce0
mov byte [esp + 0x70], 1
mov esi, dword [esp + 0x10]
mov eax, dword [esi - 0xc]
test eax, eax
jg 0x404345
or eax, 0xffffffff
jmp 0x40435b
push 0x5f
push esi
call fcn.004221d6
add esp, 8
test eax, eax
jne 0x404359
or eax, 0xffffffff
jmp 0x40435b
sub eax, esi
add eax, 1
push eax
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x18]
call fcn.00404ce0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x74], 2
call fcn.004054f0
mov byte [esp + 0x70], 1
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4043a1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x10]
push 0x2e
push esi
call fcn.004222a9
add esp, 8
test eax, eax
jne 0x4043b9
or eax, 0xffffffff
jmp 0x4043bb
sub eax, esi
push eax
push 0
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00404d10
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x74], 3
call fcn.004054f0
mov byte [esp + 0x70], 1
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404400
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x10]
cmp dword [esi - 0xc], 0
jle 0x404466
push 0x5f
push esi
call fcn.004221d6
add esp, 8
test eax, eax
je 0x404466
sub eax, esi
js 0x404466
push eax
push 0
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00404d10
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x74], 4
call fcn.004054f0
mov byte [esp + 0x70], 1
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404462
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x10]
mov eax, dword [ebp + 8]
add eax, 0x1bc
mov eax, dword [eax]
push eax
push esi
call fcn.00423ca3
add esp, 8
test eax, eax
je 0x4044f8
push edi
call fcn.00422cb0
mov ecx, dword [ebp + 8]
add esp, 4
push 0
push 0x440ed0
push 0x440f68
call fcn.0040b55e
mov edi, dword [ebp + 0xc]
push 0x441128
mov ecx, edi
call fcn.00405800
lea eax, [esi - 0x10]
mov byte [esp + 0x70], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4044cb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add ebx, 0xfffffff0
mov dword [esp + 0x70], 0xffffffff
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40468a
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
jmp 0x40468a
call fcn.004123f8
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x404512
push 0x80004005
call fcn.004052a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
add eax, 0x1bc
mov byte [esp + 0x70], 5
mov ecx, dword [eax]
mov eax, dword [edx + 0xbc]
push str._rule.ncr
push ecx
push eax
lea ecx, [esp + 0x30]
push str._s_s_s
push ecx
call fcn.00405760
mov ebx, dword [esp + 0x38]
push 0x440ef4
push ebx
call fcn.00422837
mov esi, eax
add esp, 0x1c
test esi, esi
jne 0x4045f1
push edi
call fcn.00422cb0
mov ecx, dword [ebp + 8]
add esp, 4
push esi
push 0x440ed0
push 0x440fa4
call fcn.0040b55e
mov esi, dword [ebp + 0xc]
push 0x441128
mov ecx, esi
call fcn.00405800
add ebx, 0xfffffff0
mov byte [esp + 0x70], 1
lea edx, [ebx + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x4045b8
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
mov byte [esp + 0x70], 0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4045dd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x70], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
jmp 0x4041f5
mov ecx, dword [esp + 0x14]
push esi
push ecx
push 1
push edi
call fcn.004234f0
push esi
call fcn.00422db0
push edi
call fcn.00422cb0
lea esi, [ebx - 0x10]
push esi
call fcn.00405310
mov edi, dword [ebp + 0xc]
add eax, 0x10
mov dword [edi], eax
add esp, 0x1c
mov byte [esp + 0x70], 1
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x40463d
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov byte [esp + 0x70], 0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404662
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x70], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40468a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8