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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
mov eax, dword [0x48a024]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x44], eax
xor eax, eax
push eax
push 0x8000
push ecx
mov dword [ebp - 0x34], edx
mov esi, eax
mov dword [ebp - 0x50], eax
mov edi, eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x84], eax
call fcn.0044bd6b
mov ebx, eax
add esp, 0xc
test ebx, ebx
js 0x40e331
push 2
push edi
push ebx
call fcn.0044d6a5
add esp, 0xc
mov dword [ebp - 0x5c], eax
cmp eax, 0xffffffff
je 0x40e331
inc eax
push eax
call fcn.00445d23
mov dword [ebp - 0x50], eax
pop ecx
test eax, eax
je 0x40e331
push edi
push edi
push ebx
call fcn.0044d6a5
add esp, 0xc
test eax, eax
jne 0x40e331
push dword [ebp - 0x5c]
push dword [ebp - 0x50]
push ebx
call fcn.0044c6c8
add esp, 0xc
cmp eax, dword [ebp - 0x5c]
jne 0x40e331
push ebx
call fcn.0044cefe
pop ecx
cmp eax, 0xffffffff
je 0x40e331
mov ebx, dword [ebp - 0x5c]
lea eax, [ebx*4 + 4]
push eax
call fcn.00445d23
mov dword [ebp - 0x90], eax
pop ecx
test eax, eax
je 0x40e3d2
lea ecx, [ebx*4 + 4]
push ecx
call fcn.00445d23
mov esi, eax
pop ecx
test esi, esi
je 0x40e3d2
mov ecx, dword [ebp - 0x90]
mov edx, esi
push ebx
push dword [ebp - 0x50]
call fcn.0040d79d
push esi
call fcn.00445d2e
push edi
push 0x8000
push dword [ebp - 0x34]
call fcn.0044bd6b
mov ebx, eax
add esp, 0x18
test ebx, ebx
js 0x40e353
push 2
push edi
push ebx
call fcn.0044d6a5
mov esi, eax
add esp, 0xc
mov dword [ebp - 0x60], esi
cmp esi, 0xffffffff
je 0x40e353
lea eax, [esi + 1]
push eax
call fcn.00445d23
mov dword [ebp - 0x58], eax
pop ecx
test eax, eax
je 0x40e353
push edi
push edi
push ebx
call fcn.0044d6a5
add esp, 0xc
test eax, eax
jne 0x40e353
push esi
push dword [ebp - 0x58]
push ebx
call fcn.0044c6c8
add esp, 0xc
cmp eax, esi
jne 0x40e353
push ebx
call fcn.0044cefe
pop ecx
cmp eax, 0xffffffff
je 0x40e353
lea eax, [esi + 1]
or ebx, 0xffffffff
push eax
mov dword [ebp - 0x6c], ebx
call fcn.00445d23
mov dword [ebp - 0x88], eax
pop ecx
test eax, eax
je 0x40e362
lea eax, [esi + 1]
push eax
call fcn.00445d23
mov dword [ebp - 0x8c], eax
pop ecx
test eax, eax
je 0x40e362
and dword [ebp - 0x7c], edi
and dword [ebp - 0x80], edi
push 0x478a9c
push dword [ebp - 0x44]
call fcn.0044d34b
mov dword [ebp - 0x84], eax
pop ecx
pop ecx
test eax, eax
je 0x40e362
mov eax, dword [str.BSDIFF40]
lea edx, [ebp - 0x24]
mov dword [ebp - 0x2c], eax
xor ecx, ecx
mov eax, dword [0x478aa8]
mov dword [ebp - 0x28], eax
call fcn.0040da71
lea edx, [ebp - 0x1c]
xor ecx, ecx
call fcn.0040da71
lea edx, [ebp - 0x14]
mov ecx, esi
call fcn.0040da71
mov esi, dword [ebp - 0x84]
lea eax, [ebp - 0x2c]
push esi
push 1
push 0x20
push eax
call fcn.0044d23a
add esp, 0x10
cmp eax, 1
jne 0x40e331
sub esp, 0xc
lea ecx, [ebp - 0x38]
mov edx, esi
call fcn.0040fd5c
mov edi, eax
mov dword [ebp - 0x64], edi
test edi, edi
je 0x40e331
mov eax, dword [ebp - 0x60]
xor edx, edx
and dword [ebp - 0x70], edx
xor esi, esi
and dword [ebp - 0x74], esi
and dword [ebp - 0x40], edx
mov dword [ebp - 0x54], edx
test eax, eax
jle 0x40e21d
add esi, dword [ebp - 0x74]
xor ecx, ecx
mov edx, dword [ebp - 0x54]
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x44], esi
cmp esi, eax
jge 0x40defc
mov ecx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x58]
sub ecx, esi
mov ebx, dword [ebp - 0x30]
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebp - 0x40]
sub ecx, eax
lea edx, [esi + eax]
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x4c], ecx
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x48], edx
lea edi, [ebp - 0x68]
push edi
push ecx
push 0
push eax
push edx
mov edx, dword [ebp - 0x50]
push ecx
mov ecx, dword [ebp - 0x90]
call fcn.0040d9c4
mov edx, dword [ebp - 0x44]
add esp, 0x18
mov edi, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x74], eax
add eax, esi
mov dword [ebp - 0x34], eax
cmp edx, eax
jge 0x40dea2
mov edi, dword [ebp - 0x58]
mov esi, dword [ebp - 0x50]
mov eax, dword [ebp - 0x4c]
lea ebx, [edx + edi]
add eax, ebx
mov ebx, dword [ebp - 0x30]
cmp eax, ecx
jge 0x40de93
mov eax, dword [ebp - 0x40]
add eax, edx
mov al, byte [eax + esi]
cmp al, byte [edx + edi]
jne 0x40de93
inc ebx
mov dword [ebp - 0x30], ebx
inc edx
cmp edx, dword [ebp - 0x34]
jl 0x40de73
mov esi, dword [ebp - 0x78]
mov edi, dword [ebp - 0x60]
mov dword [ebp - 0x44], edx
mov edx, dword [ebp - 0x74]
cmp edx, ebx
jne 0x40dead
test edx, edx
jne 0x40deed
lea eax, [ebx + 8]
cmp edx, eax
jg 0x40deed
mov eax, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x48]
add eax, edx
cmp eax, ecx
jge 0x40ded6
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x50]
add eax, esi
mov al, byte [eax + ecx]
mov ecx, dword [ebp - 0x5c]
cmp al, byte [edx]
jne 0x40ded6
dec ebx
mov dword [ebp - 0x30], ebx
mov eax, dword [ebp - 0x3c]
inc esi
dec eax
mov dword [ebp - 0x78], esi
inc edx
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x48], edx
cmp esi, edi
jl 0x40de3d
mov edi, dword [ebp - 0x64]
mov ebx, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x54]
cmp dword [ebp - 0x74], ecx
jne 0x40df09
cmp esi, eax
jne 0x40e217
xor ecx, ecx
xor eax, eax
and dword [ebp - 0x40], ecx
and dword [ebp - 0x48], ecx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x30], eax
cmp edx, esi
jge 0x40df86
mov edi, dword [ebp - 0x58]
mov ebx, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x70]
add ecx, eax
cmp ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebp - 0x3c]
jge 0x40df80
add eax, edx
mov edx, dword [ebp - 0x34]
inc ecx
mov al, byte [eax + edi]
cmp byte [edx + ebx], al
mov eax, dword [ebp - 0x30]
cmovne ecx, dword [ebp - 0x3c]
inc eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x3c], ecx
lea edx, [ecx + ecx]
sub edx, eax
mov eax, dword [ebp - 0x40]
lea ecx, [eax + eax]
mov eax, dword [ebp - 0x3c]
sub ecx, dword [ebp - 0x48]
cmp edx, ecx
mov edx, dword [ebp - 0x54]
cmovle eax, dword [ebp - 0x40]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x30]
cmovle eax, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x30]
add eax, edx
cmp eax, esi
mov eax, dword [ebp - 0x30]
jl 0x40df23
mov edi, dword [ebp - 0x64]
mov ebx, dword [ebp - 0x6c]
xor eax, eax
mov dword [ebp - 0x30], eax
cmp esi, dword [ebp - 0x60]
jge 0x40e023
xor ecx, ecx
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x34], eax
inc ecx
lea eax, [edx + 1]
mov dword [ebp - 0x4c], ecx
cmp esi, eax
jl 0x40e023
mov eax, dword [ebp - 0x50]
mov edx, dword [ebp - 0x68]
dec eax
mov edi, dword [ebp - 0x30]
add eax, edx
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x58]
dec eax
add eax, esi
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x30], ecx
cmp edx, ecx
jl 0x40e01a
mov al, byte [eax]
mov edx, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x40]
lea ecx, [edx + 1]
cmp byte [ebx], al
mov ebx, dword [ebp - 0x34]
cmovne ecx, edx
mov eax, ecx
mov dword [ebp - 0x3c], eax
lea edx, [ebx + ebx]
sub edx, edi
lea ecx, [eax + eax]
mov eax, dword [ebp - 0x4c]
sub ecx, eax
inc eax
dec dword [ebp - 0x44]
dec dword [ebp - 0x40]
cmp ecx, edx
mov edx, dword [ebp - 0x68]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x4c]
cmovle eax, edi
mov edi, eax
mov eax, dword [ebp - 0x3c]
cmovle eax, ebx
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x54]
add eax, ecx
cmp esi, eax
mov eax, dword [ebp - 0x44]
jge 0x40dfbf
mov ebx, dword [ebp - 0x6c]
mov dword [ebp - 0x30], edi
mov edi, dword [ebp - 0x64]
mov eax, dword [ebp - 0x54]
mov ecx, esi
mov edx, dword [ebp - 0x48]
add eax, edx
sub ecx, dword [ebp - 0x30]
cmp eax, ecx
jle 0x40e0ea
mov ecx, dword [ebp - 0x30]
xor eax, eax
and dword [ebp - 0x34], 0
sub ecx, esi
and dword [ebp - 0x4c], 0
add ecx, edx
add ecx, dword [ebp - 0x54]
and dword [ebp - 0x40], eax
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x3c], eax
test ecx, ecx
jle 0x40e0dd
mov edi, edx
mov ebx, ecx
mov edx, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x54]
mov eax, edx
mov edx, dword [ebp - 0x50]
sub eax, ebx
mov ebx, dword [ebp - 0x34]
add eax, edi
mov edi, dword [ebp - 0x58]
add ecx, eax
add eax, dword [ebp - 0x70]
mov al, byte [eax + edx]
lea edx, [ebx + 1]
cmp byte [ecx + edi], al
mov eax, dword [ebp - 0x40]
cmovne edx, ebx
sub eax, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x50]
lea ecx, [eax + esi]
add eax, dword [ebp - 0x68]
mov al, byte [eax + ebx]
lea ebx, [edx - 1]
cmp byte [ecx + edi], al
mov edi, dword [ebp - 0x48]
cmovne ebx, edx
mov edx, dword [ebp - 0x40]
inc edx
mov dword [ebp - 0x34], ebx
cmp ebx, dword [ebp - 0x4c]
mov eax, ebx
mov ebx, dword [ebp - 0x44]
mov ecx, edx
cmovle ecx, dword [ebp - 0x3c]
cmovle eax, dword [ebp - 0x4c]
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x4c], eax
cmp edx, ebx
jl 0x40e064
mov edi, dword [ebp - 0x64]
mov ebx, dword [ebp - 0x6c]
mov edx, dword [ebp - 0x48]
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x3c]
sub eax, ecx
add edx, eax
mov eax, dword [ebp - 0x3c]
sub dword [ebp - 0x30], eax
mov dword [ebp - 0x48], edx
xor ecx, ecx
test edx, edx
jle 0x40e130
mov eax, dword [ebp - 0x58]
add eax, dword [ebp - 0x54]
mov edx, dword [ebp - 0x48]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x50]
add eax, dword [ebp - 0x70]
mov edi, dword [ebp - 0x34]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x7c]
add eax, dword [ebp - 0x88]
mov esi, dword [ebp - 0x44]
mov ebx, eax
mov dword [ebp - 0x4c], eax
mov al, byte [edi + ecx]
sub al, byte [esi + ecx]
mov byte [ebx + ecx], al
inc ecx
cmp ecx, edx
jl 0x40e119
mov esi, dword [ebp - 0x78]
mov edi, dword [ebp - 0x64]
mov ebx, dword [ebp - 0x6c]
and dword [ebp - 0x44], 0
mov eax, esi
sub eax, dword [ebp - 0x30]
mov ecx, eax
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x54]
sub ecx, edx
sub ecx, eax
mov dword [ebp - 0x4c], ecx
test ecx, ecx
jle 0x40e17b
mov esi, dword [ebp - 0x44]
add eax, edx
mov dword [ebp - 0x34], eax
mov edx, eax
mov eax, dword [ebp - 0x8c]
add edx, dword [ebp - 0x58]
add eax, dword [ebp - 0x80]
mov dword [ebp - 0x34], eax
mov edi, eax
mov al, byte [edx]
mov byte [edi + esi], al
inc esi
inc edx
cmp esi, ecx
jl 0x40e167
mov esi, dword [ebp - 0x78]
mov edi, dword [ebp - 0x64]
mov edx, dword [ebp - 0x48]
add dword [ebp - 0x7c], edx
lea edx, [ebp - 0xc]
add dword [ebp - 0x80], ecx
mov ecx, dword [ebp - 0x48]
call fcn.0040da71
push 8
lea eax, [ebp - 0xc]
mov edx, edi
push eax
lea ecx, [ebp - 0x38]
call fcn.0040fe31
cmp dword [ebp - 0x38], 0
jne 0x40e331
mov ecx, dword [ebp - 0x4c]
lea edx, [ebp - 0xc]
call fcn.0040da71
push 8
lea eax, [ebp - 0xc]
mov edx, edi
push eax
lea ecx, [ebp - 0x38]
call fcn.0040fe31
cmp dword [ebp - 0x38], 0
jne 0x40e331
mov eax, dword [ebp - 0x68]
lea edx, [ebp - 0xc]
sub eax, dword [ebp - 0x30]
mov ecx, eax
mov dword [ebp - 0x34], eax
sub ecx, dword [ebp - 0x48]
sub ecx, dword [ebp - 0x70]
call fcn.0040da71
push 8
lea eax, [ebp - 0xc]
mov edx, edi
push eax
lea ecx, [ebp - 0x38]
call fcn.0040fe31
cmp dword [ebp - 0x38], 0
jne 0x40e331
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x68]
sub eax, esi
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x60]
cmp esi, eax
jl 0x40de02
sub esp, 0x14
lea ecx, [ebp - 0x38]
mov edx, edi
call fcn.0040ff5b
cmp dword [ebp - 0x38], 0
jne 0x40e331
mov esi, dword [ebp - 0x84]
xor edi, edi
push esi
call fcn.0044b452
mov dword [ebp - 0x34], eax
pop ecx
cmp eax, 0xffffffff
je 0x40e331
lea ecx, [eax - 0x20]
lea edx, [ebp - 0x24]
call fcn.0040da71
sub esp, 0xc
lea ecx, [ebp - 0x38]
mov edx, esi
call fcn.0040fd5c
mov edi, eax
test edi, edi
je 0x40e331
push dword [ebp - 0x7c]
mov edx, edi
lea ecx, [ebp - 0x38]
push dword [ebp - 0x88]
call fcn.0040fe31
cmp dword [ebp - 0x38], 0
jne 0x40e331
sub esp, 0x14
lea ecx, [ebp - 0x38]
mov edx, edi
call fcn.0040ff5b
cmp dword [ebp - 0x38], 0
jne 0x40e331
push esi
xor edi, edi
call fcn.0044b452
pop ecx
cmp eax, 0xffffffff
je 0x40e331
sub eax, dword [ebp - 0x34]
lea edx, [ebp - 0x1c]
mov ecx, eax
call fcn.0040da71
sub esp, 0xc
lea ecx, [ebp - 0x38]
mov edx, esi
call fcn.0040fd5c
mov edi, eax
test edi, edi
je 0x40e331
push dword [ebp - 0x80]
mov edx, edi
lea ecx, [ebp - 0x38]
push dword [ebp - 0x8c]
call fcn.0040fe31
cmp dword [ebp - 0x38], 0
jne 0x40e331
sub esp, 0x14
lea ecx, [ebp - 0x38]
mov edx, edi
call fcn.0040ff5b
cmp dword [ebp - 0x38], 0
jne 0x40e331
xor edi, edi
push edi
push edi
push esi
call fcn.0044ce61
add esp, 0xc
test eax, eax
jne 0x40e331
push esi
push 1
lea eax, [ebp - 0x2c]
push 0x20
push eax
call fcn.0044d23a
add esp, 0x10
cmp eax, 1
jne 0x40e331
push esi
call fcn.0044c145
pop ecx
test eax, eax
je 0x40e365
mov eax, dword [ebp - 0x84]
test eax, eax
je 0x40e342
push eax
call fcn.0044c145
pop ecx
test edi, edi
je 0x40e353
sub esp, 0x14
lea ecx, [ebp - 0x38]
mov edx, edi
call fcn.0040ff5b
xor edi, edi
inc edi
cmp ebx, 0xffffffff
je 0x40e365
push ebx
call fcn.0044cefe
pop ecx
xor edi, edi
inc edi
mov eax, dword [ebp - 0x88]
test eax, eax
je 0x40e376
push eax
call fcn.00445d2e
pop ecx
mov eax, dword [ebp - 0x8c]
xor esi, esi
test eax, eax
je 0x40e389
push eax
call fcn.00445d2e
pop ecx
mov eax, dword [ebp - 0x90]
test eax, eax
je 0x40e39a
push eax
call fcn.00445d2e
pop ecx
test esi, esi
je 0x40e3a5
push esi
call fcn.00445d2e
pop ecx
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x40e3b3
push eax
call fcn.00445d2e
pop ecx
mov eax, dword [ebp - 0x58]
test eax, eax
je 0x40e3c1
push eax
call fcn.00445d2e
pop ecx
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043fc0b
leave
ret
xor edi, edi
inc edi
jmp 0x40e389