Function at 0x403810
Capabilities:
Delete file
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x2104]
mov eax, 0x2104
call fcn.00425260
push 0xffffffffffffffff
push 0x43a4e7
mov eax, dword fs:[0]
push eax
sub esp, 0x8c
mov eax, dword [0x44a5d0]
xor eax, ebp
mov dword [ebp + 0x2100], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0x24], 0
mov eax, dword [edi + 0xa8]
mov ebx, edx
push 0x441128
push eax
mov dword [ebp - 0x90], edi
mov dword [ebp - 0x7c], ebx
call fcn.00423a76
add esp, 8
test eax, eax
sete al
test al, al
jne 0x4040ef
mov eax, dword [edi + 0xac]
push 0x441128
push eax
call fcn.00423a76
add esp, 8
test eax, eax
sete al
test al, al
jne 0x4040ef
lea ecx, [ebp - 0x50]
call fcn.0040f7dc
push 0
mov esi, 1
mov dword [ebp - 4], esi
mov eax, dword [edi + 0x98]
push 0
push eax
lea ecx, [ebp - 0x50]
call fcn.0040fd88
test eax, eax
jne 0x4038f0
push 0x441128
mov ecx, ebx
call fcn.00405800
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x24], esi
mov byte [ebp - 4], 0
call fcn.0040f94a
jmp 0x4040fb
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x50]
call fcn.00410cae
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 2
call fcn.0040f6ca
call fcn.004123f8
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x403922
push 0x80004005
call fcn.004052a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x20], eax
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x18]
push 0x2e
push ecx
call fcn.004222a9
add esp, 8
test eax, eax
je 0x40398c
sub eax, dword [ebp - 0x18]
cmp eax, 0xffffffff
je 0x40398c
push eax
lea edx, [ebp - 0x1c]
push edx
lea ecx, [ebp - 0x18]
call fcn.00404e40
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 4
call fcn.004054f0
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40398c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x440ec0
lea ecx, [edi + 0xa0]
push ecx
lea edx, [ebp - 0x94]
push edx
call fcn.00405000
lea ecx, [ebp - 0x20]
push ecx
push eax
lea edx, [ebp - 0x8c]
push edx
mov byte [ebp - 4], 5
call fcn.00404f40
push 0x440eb4
push eax
lea eax, [ebp - 0x14]
push eax
mov byte [ebp - 4], 6
call fcn.00405000
add esp, 0x24
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x8c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4039f5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x94]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403a1b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call fcn.004116f1
mov esi, dword [eax + 8]
push str.GDCA_EXE
push 0x81
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
mov dword [ebp - 0x1c], eax
jne 0x403ade
push eax
push 0x440ed0
push 0x440ed8
mov ecx, edi
call fcn.0040b55e
push 0x441128
mov ecx, ebx
call fcn.00405800
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov dword [ebp - 0x24], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403a87
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403aaa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403acd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 0
call fcn.0040f94a
jmp 0x4040fb
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, dword [ebp - 0x1c]
push ecx
push esi
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edx, dword [ebp - 0x14]
push 0x440ef4
push edx
mov dword [ebp - 0x88], eax
call fcn.00422837
mov esi, eax
add esp, 8
test esi, esi
mov dword [ebp - 0x28], esi
je 0x403c49
mov eax, dword [ebp - 0x88]
mov ecx, dword [ebp - 0x2c]
push esi
push eax
push 1
push ecx
call fcn.004234f0
mov edx, dword [edi + 0x1bc]
mov eax, dword [edx - 0xc]
push esi
push 1
lea ecx, [ebp - 0x84]
push 4
push ecx
mov dword [ebp - 0x84], eax
call fcn.004234f0
mov edx, dword [ebp - 0x84]
mov eax, dword [edi + 0x1bc]
push esi
push edx
push 1
push eax
call fcn.004234f0
mov eax, dword [edi + 0xb8]
mov ecx, dword [eax - 0xc]
push esi
push 1
lea edx, [ebp - 0x64]
push 4
push edx
mov dword [ebp - 0x64], ecx
call fcn.004234f0
mov ecx, dword [ebp - 0x64]
mov eax, dword [edi + 0xb8]
add esp, 0x40
push esi
push ecx
push 1
push eax
call fcn.004234f0
mov edx, dword [ebp - 0x18]
mov eax, dword [edx - 0xc]
push esi
push 1
lea ecx, [ebp - 0x68]
push 4
push ecx
mov dword [ebp - 0x68], eax
call fcn.004234f0
mov edx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x18]
push esi
push edx
push 1
push eax
call fcn.004234f0
push 0xfff
lea ecx, [ebp + 0x1001]
push 0
push ecx
mov byte [ebp + 0x1000], 0
call fcn.004249b0
push 0xff
lea edx, [ebp + 0x2001]
push 0
push edx
mov byte [ebp + 0x2000], 0
call fcn.004249b0
add esp, 0x48
push 0xfff
lea eax, [ebp + 1]
push 0
push eax
mov byte [ebp], 0
call fcn.004249b0
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x80], eax
lea ecx, [ebp - 0x40]
push ecx
lea edx, [ebp + 0x2000]
push edx
lea eax, [ebp + 0x1000]
push eax
lea ecx, [ebp - 0x30]
call fcn.00401e90
test eax, eax
push esi
je 0x403c85
call fcn.00422db0
mov ecx, dword [ebp - 0x14]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0x441128
mov ecx, ebx
call fcn.00405800
mov dword [ebp - 0x24], 1
lea ecx, [ebp - 0x14]
call fcn.00401350
lea ecx, [ebp - 0x20]
call fcn.00401350
lea ecx, [ebp - 0x18]
call fcn.00401350
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 0
call fcn.0040f94a
jmp 0x4040fb
push 1
lea edx, [ebp - 0x40]
push 4
push edx
call fcn.004234f0
mov eax, dword [ebp - 0x40]
push esi
push eax
lea ecx, [ebp + 0x2000]
push 1
push ecx
call fcn.004234f0
push esi
push 1
lea edx, [ebp - 0x30]
push 4
push edx
call fcn.004234f0
mov eax, dword [ebp - 0x30]
push esi
push eax
lea ecx, [ebp + 0x1000]
push 1
push ecx
call fcn.004234f0
add esp, 0x40
push esi
push 1
lea eax, [edi + 0x90]
push 4
push eax
call fcn.004234f0
mov edx, dword [edi + 0x90]
push esi
push edx
lea eax, [edi + 0x78]
push 1
push eax
call fcn.004234f0
add esp, 0x20
lea ecx, [ebp - 0x60]
call fcn.0040f7dc
push 0
mov byte [ebp - 4], 0xa
mov eax, dword [edi + 0xa8]
push 0x8000
push eax
lea ecx, [ebp - 0x60]
call fcn.0040fd88
test eax, eax
jne 0x403d5b
push eax
push eax
push 0x440e78
mov ecx, edi
call fcn.0040b55e
push esi
call fcn.00422db0
mov ecx, dword [ebp - 0x14]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0x441128
mov ecx, ebx
call fcn.00405800
lea ecx, [ebp - 0x60]
mov dword [ebp - 0x24], 1
mov byte [ebp - 4], 9
call fcn.0040f94a
jmp 0x403c5c
lea ecx, [ebp - 0x60]
call fcn.0040f579
push eax
mov dword [ebp - 0x3c], eax
call fcn.00422bed
add esp, 4
mov byte [ebp - 4], 0xb
mov edx, dword [ebp - 0x3c]
push edx
push eax
lea ecx, [ebp - 0x60]
mov dword [ebp - 0x1c], eax
call fcn.0040f394
lea ecx, [ebp - 0x60]
mov dword [ebp - 4], 0xa
call fcn.0040f6ca
push esi
push 1
lea eax, [ebp - 0x3c]
push 4
push eax
call fcn.004234f0
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x1c]
push esi
push ecx
push 1
push edx
call fcn.004234f0
add esp, 0x20
lea ecx, [ebp - 0x78]
call fcn.0040f7dc
push 0
mov byte [ebp - 4], 0xd
mov eax, dword [edi + 0xac]
push 0x8000
push eax
lea ecx, [ebp - 0x78]
call fcn.0040fd88
test eax, eax
jne 0x403e2c
push esi
call fcn.00422db0
add esp, 4
push 0
push 0
push 0x440f0c
mov ecx, edi
call fcn.0040b55e
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0x441128
mov ecx, ebx
call fcn.00405800
lea ecx, [ebp - 0x78]
mov dword [ebp - 0x24], 1
mov byte [ebp - 4], 0xa
call fcn.0040f94a
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 9
call fcn.0040f94a
jmp 0x403c5c
lea ecx, [ebp - 0x78]
call fcn.0040f579
push esi
push 1
lea ecx, [ebp - 0x34]
push 4
push ecx
mov dword [ebp - 0x34], eax
call fcn.004234f0
mov edx, dword [ebp - 0x34]
mov eax, dword [edi + 0x188]
add esp, 0x10
push edx
push 0
push 0x406
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
lea eax, [edi + 0x168]
call fcn.004053a0
push 0xa00000
call fcn.00405cc4
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x34]
add esp, 4
test eax, eax
mov dword [ebp - 0x1c], 0
jbe 0x403eff
sub eax, dword [ebp - 0x1c]
mov dword [ebp - 0x28], 0xa00000
cmp eax, 0xa00000
ja 0x403e9d
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x2c]
push ecx
push edx
lea ecx, [ebp - 0x78]
call fcn.0040f394
mov ecx, dword [ebp - 0x28]
cmp ecx, eax
push esi
jne 0x403fae
mov eax, dword [ebp - 0x2c]
add dword [ebp - 0x1c], ecx
push ecx
push 1
push eax
call fcn.004234f0
add esp, 0x10
cmp dword [ebp - 0x28], eax
push esi
jne 0x403fd8
call fcn.0042243a
mov ecx, dword [ebp - 0x28]
mov edx, dword [edi + 0x188]
add esp, 4
push 0
push ecx
push 0x403
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [ebp - 0x34]
mov ecx, eax
sub ecx, dword [ebp - 0x1c]
jne 0x403e89
lea ecx, [ebp - 0x78]
call fcn.0040f6ca
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00405cc9
mov eax, dword [ebp - 0x30]
add esp, 4
lea ecx, [ebp - 0x80]
push ecx
lea edx, [ebp]
push edx
push eax
lea ecx, [ebp + 0x1000]
push ecx
call dword [sym.imp.GDCA_API.dll_GDCA_Base64Encode]
mov edx, dword [edi + 0x90]
add edx, 0x1000
push 1
push edx
call fcn.00423352
mov edx, dword [edi + 0x90]
add esp, 8
lea ecx, [ebp - 0x38]
push ecx
mov ecx, dword [ebp - 0x80]
push eax
push 0
push 0x8004
push edx
mov dword [ebp - 0x1c], eax
lea eax, [edi + 0x78]
push eax
push ecx
lea edx, [ebp]
push edx
push 4
push 0x10
push str.LAB_USERCERT_SIG
mov dword [ebp - 0x38], 0
call dword [sym.imp.GDCA_API.dll_GDCA_OpkiSignData]
test eax, eax
je 0x40400d
mov eax, dword [ebp - 0x1c]
push eax
call fcn.00422cb0
push esi
call fcn.00422db0
add esp, 8
push 0
push 0
push 0x440f4c
mov ecx, edi
call fcn.0040b55e
mov ecx, dword [ebp - 0x14]
push ecx
jmp 0x403df6
call fcn.00422db0
add esp, 4
lea ecx, [ebp - 0x78]
call fcn.0040f6ca
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00405cc9
add esp, 4
push 0
push 0
push 0x440f20
jmp 0x403deb
call fcn.00422db0
add esp, 4
lea ecx, [ebp - 0x78]
call fcn.0040f6ca
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.00405cc9
add esp, 4
push 0
push 0
push str.FMN
mov ecx, edi
call fcn.0040b55e
mov edx, dword [ebp - 0x14]
push edx
jmp 0x403df6
push esi
push 1
lea edx, [ebp - 0x38]
push 4
push edx
call fcn.004234f0
mov eax, dword [ebp - 0x38]
mov edi, dword [ebp - 0x1c]
push esi
push eax
push 1
push edi
call fcn.004234f0
push esi
push 1
lea ecx, [ebp - 0x88]
push 4
push ecx
call fcn.004234f0
push edi
call fcn.00422cb0
push esi
call fcn.00422db0
add esp, 0x38
lea edx, [ebp - 0x14]
push edx
mov ecx, ebx
call fcn.004052f0
jmp 0x403e08
push 0x441128
mov ecx, ebx
call fcn.00405800
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x2100]
xor ecx, ebp
call fcn.00421f10
add ebp, 0x2104
mov esp, ebp
pop ebp
ret