Function at 0x407190
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x455d96
mov eax, dword fs:[0]
push eax
sub esp, 0x37c
mov eax, dword [0x46c6a0]
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 esi, ecx
mov ecx, dword [esi + 0x5c0]
xor edi, edi
cmp ecx, edi
je 0x4072dc
mov eax, dword [ecx + 4]
cmp eax, edi
jl 0x4072dc
cmp dword [ecx + 0x8c], eax
jl 0x4072dc
imul eax, eax, 0x201
add eax, dword [ecx + 0x88]
je 0x4072dc
mov eax, dword [esi + 0x20]
push eax
mov eax, dword [ecx + 4]
cmp eax, edi
jge 0x407208
xor eax, eax
jmp 0x407220
cmp dword [ecx + 0x8c], eax
jge 0x407214
xor eax, eax
jmp 0x407220
imul eax, eax, 0x201
add eax, dword [ecx + 0x88]
push ecx
add eax, 0xe0
mov ecx, esp
mov dword [ebp - 0x360], esp
push eax
call fcn.00403280
lea eax, [ebp - 0x364]
push eax
call fcn.0040cd50
mov dword [ebp - 4], edi
mov eax, dword [eax]
lea ecx, [esi + 0x57c]
mov edx, eax
mov dword [ebp - 0x36c], ecx
call fcn.004139b0
mov bl, al
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x364]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407283
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
jne 0x4072e3
push ecx
mov ecx, esp
mov dword [ebp - 0x360], esp
push 0x45e610
call fcn.00403280
lea ecx, [esi + 0x134c]
call fcn.00412a90
mov esi, dword [esi + 0x5c0]
mov eax, dword [esi + 4]
cmp eax, edi
jge 0x4072b6
xor eax, eax
jmp 0x4072ca
cmp dword [esi + 0x8c], eax
jl 0x4072b2
imul eax, eax, 0x201
add eax, dword [esi + 0x88]
mov ebx, dword [ebp - 0x36c]
mov byte [eax + 0x200], 1
call fcn.00413d60
xor al, al
jmp 0x4077e3
push str.__patchdir.txt
call dword [0x457348]
mov ebx, dword [ebp - 0x36c]
lea ecx, [esi + 0x530]
push ecx
push str.dir.txt
mov ecx, str.__patchdir.txt
mov edx, ebx
call fcn.00413e30
push ecx
mov ecx, esp
mov dword [ebp - 0x360], esp
test al, al
jne 0x40734c
push 0x45e630
call fcn.00403280
lea ecx, [esi + 0x134c]
call fcn.00412a90
call fcn.00413d60
mov ecx, dword [esi + 0x5c0]
call fcn.00405300
mov byte [eax + 0x200], 1
xor al, al
jmp 0x4077e3
push 0x45e64c
call fcn.00403280
lea ebx, [esi + 0x134c]
mov ecx, ebx
mov dword [ebp - 0x364], ebx
call fcn.00412a90
lea ecx, [ebp - 0x384]
call fcn.00423a9e
mov dword [ebp - 4], 1
lea edx, [ebp - 0x358]
push edx
push str.__patchdir.txt
mov dword [ebp - 0x358], edi
mov dword [ebp - 0x354], edi
mov dword [ebp - 0x350], edi
mov dword [ebp - 0x34c], edi
mov dword [ebp - 0x348], edi
mov dword [ebp - 0x344], edi
call fcn.00424129
fld dword [esi + 0x5d4]
mov eax, dword [ebp - 0x340]
sub esp, 8
fstp qword [esp]
push str._8.6f
mov dword [esi + 0x7dc], eax
call fcn.00438b64
add esp, 8
mov ecx, esp
mov dword [ebp - 0x360], esp
push 0x45e668
call fcn.00403280
mov ecx, ebx
call fcn.00412a90
push 0x45e5b0
lea ecx, [ebp - 0x35c]
push str.__patchdir.txt
push ecx
mov dword [esi + 0x5d0], edi
mov dword [ebp - 0x35c], edi
mov dword [ebp - 0x368], edi
call fcn.00438712
add esp, 0xc
test eax, eax
jne 0x4074d4
mov eax, dword [ebp - 0x35c]
cmp eax, edi
je 0x4074d4
push edi
push edi
push eax
call fcn.0043a5cf
mov edx, dword [ebp - 0x35c]
add esp, 0xc
push edx
push 1
lea eax, [ebp - 0x1c]
push 0xa
push eax
call fcn.0043902c
mov al, byte [ebp - 0x1c]
mov bl, byte [ebp - 0x1b]
add esp, 0x10
cmp al, 0xff
jne 0x407477
cmp bl, 0xfe
jne 0x407477
mov dl, 1
xor cl, cl
cmp al, 0xef
jne 0x407489
cmp bl, 0xbb
jne 0x407489
cmp byte [ebp - 0x1a], 0xbf
jne 0x407489
mov al, 1
jmp 0x40748b
xor dl, dl
cmp al, 0xfe
jne 0x407462
cmp bl, 0xff
jne 0x407462
cmp byte [ebp - 0x1a], dl
jne 0x407462
mov cl, 1
xor al, al
test dl, dl
jne 0x407497
test cl, cl
jne 0x407497
test al, al
je 0x40749e
mov ebx, 1
jmp 0x4074a4
mov ebx, dword [ebp - 0x368]
mov ecx, dword [ebp - 0x35c]
push ecx
call fcn.0043a6cb
add esp, 4
cmp ebx, edi
je 0x4074d4
push str.rt_ccsUNICODE
lea edx, [ebp - 0x35c]
push str.__patchdir.txt
push edx
call fcn.00438712
add esp, 0xc
mov ebx, eax
jmp 0x4074fd
push 0x45e5c4
lea eax, [ebp - 0x35c]
push str.__patchdir.txt
push eax
call fcn.00438712
add esp, 0xc
push 0x45e5c8
push edi
mov ebx, eax
call fcn.0043a3d5
add esp, 8
cmp ebx, edi
jne 0x4077a6
mov ebx, dword [ebp - 0x35c]
cmp ebx, edi
je 0x4077a6
push 0x103
lea ecx, [ebp - 0x127]
push edi
push ecx
mov byte [ebp - 0x128], 0
call fcn.0043b170
add esp, 0xc
push ebx
lea edx, [ebp - 0x128]
push 0x104
push edx
call fcn.0043895b
add esp, 8
mov ecx, esp
mov dword [ebp - 0x360], esp
push 0x45e688
call fcn.00403280
mov ecx, dword [ebp - 0x364]
call fcn.00412a90
cmp byte [esi + 0x7e1], 0
jne 0x407776
mov eax, dword [ebp - 0x35c]
push eax
lea ecx, [ebp - 0x128]
push 0x104
push ecx
call fcn.0043895b
add esp, 0xc
lea edi, [ebp - 0x128]
mov ebx, eax
call fcn.00409c20
test ebx, ebx
je 0x40778c
mov al, byte [ebp - 0x128]
cmp al, 0x2f
je 0x40774e
cmp al, 0x5c
je 0x40774e
cmp al, 0x31
je 0x4075c0
cmp al, 0x32
jne 0x407769
mov eax, dword [esi + 0x5d0]
imul eax, eax, 0x318
lea edx, [ebp - 0x230]
push edx
add eax, 0x4711c8
push 0x104
push eax
call fcn.004367ce
add esp, 0xc
lea ecx, [ebp - 0x128]
push 0x45e5e8
push ecx
call fcn.00438aa3
push eax
call fcn.00436356
add esp, 0xc
push 0x45e5e8
push 0
mov ebx, eax
call fcn.00438aa3
push eax
call fcn.00436356
add esp, 0xc
push 0x45e5e8
push 0
mov dword [ebp - 0x360], eax
call fcn.00438aa3
push eax
call fcn.00436356
add esp, 0xc
push 0x45e5ec
push 0
mov dword [ebp - 0x370], eax
call fcn.00438aa3
push eax
call fcn.00436356
add esp, 0xc
push 0x45e5ec
push 0
mov dword [ebp - 0x374], eax
call fcn.00438aa3
push eax
call fcn.00436356
add esp, 0xc
push 0x45e5f0
push 0
mov dword [ebp - 0x368], eax
call fcn.00438aa3
add esp, 8
mov edi, eax
call fcn.0040ad00
push edi
call fcn.00436356
mov edx, dword [esi + 0x5d0]
imul edx, edx, 0x318
add esp, 4
push 0x45e5f0
push 0
mov dword [edx + 0x4712d4], eax
call fcn.00438aa3
push eax
mov eax, dword [esi + 0x5d0]
imul eax, eax, 0x318
add eax, 0x4712d8
push 0x104
push eax
call fcn.004367ce
add esp, 0x14
push 0x45e5f0
push 0
call fcn.00438aa3
add esp, 8
test eax, eax
je 0x4076ff
mov ecx, dword [esi + 0x5d0]
imul ecx, ecx, 0x318
push eax
add ecx, 0x4713dc
push 0x104
push ecx
call fcn.004367ce
add esp, 0xc
mov edx, dword [ebp - 0x368]
mov eax, dword [ebp - 0x374]
mov ecx, dword [ebp - 0x370]
push 0xffffffffffffffff
push 0
push edx
mov edx, dword [ebp - 0x360]
push eax
push ecx
push edx
push ebx
lea ecx, [ebp - 0x1c]
call fcn.004041c0
mov eax, dword [esi + 0x5d0]
mov ecx, dword [ebp - 0x1c]
imul eax, eax, 0x318
mov edx, dword [ebp - 0x18]
mov dword [eax + 0x4712cc], ecx
mov dword [eax + 0x4712d0], edx
inc dword [esi + 0x5d0]
jmp 0x407769
lea eax, [ebp - 0x128]
push eax
lea ecx, [ebp - 0x230]
push 0x104
push ecx
call fcn.004367ce
add esp, 0xc
cmp byte [esi + 0x7e1], 0
je 0x40756e
lea ecx, [ebp - 0x384]
mov dword [ebp - 4], 0xffffffff
call fcn.00423bb7
xor al, al
jmp 0x4077e3
mov edx, dword [ebp - 0x35c]
push edx
call fcn.0043a6cb
add esp, 4
push str.__patchdir.txt
call dword [0x457348]
push ecx
mov ecx, esp
mov dword [ebp - 0x360], esp
push 0x45e6a8
call fcn.00403280
mov ecx, dword [ebp - 0x364]
call fcn.00412a90
mov ebx, dword [ebp - 0x36c]
call fcn.00413d60
lea ecx, [ebp - 0x384]
mov dword [ebp - 4], 0xffffffff
call fcn.00423bb7
mov al, 1
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.00435339
mov esp, ebp
pop ebp
ret